Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: develop: tools: add VS Code setup guide #1

Closed
wants to merge 981 commits into from
Closed

Conversation

deribaucourt
Copy link
Member

This basic guide only covers linting so far. It could be expanded in the future to be more accurate and detailed. The current configuration allows to navigate the code but some symbols are not recognized by the linter, and the native compiler is always used.

peter-mitsis and others added 8 commits June 12, 2024 14:33
Restructures the latency_measure benchmark configurations. Most of them
do not need to be executed by default by CI. However, we still want to
make it easy to run the benchmark with various configurations so that
they can be easily compared against the default.

The updated documentation shows how this can be done.

Signed-off-by: Peter Mitsis <[email protected]>
`irq0-channels` defines even-numbered channels as the default value.
Since 6 was dropped from this definition, it is added.
Also, since the maximum number of channels is 12,
remove the ones that are exceeded.

Signed-off-by: TOKITA Hiroshi <[email protected]>
A `GPIO` word is in the description section.
Correcting it to `DMA`.

Signed-off-by: TOKITA Hiroshi <[email protected]>
This adds a basic example demonstrating how to enable and use the CMSIS-DSP
module in Zephyr.

Signed-off-by: Benjamin Cabé <[email protected]>
This PR is implementing a new formula to calculate the I2C timing
value from the I2C clock source and the bit rate.
This is done under flag CONFIG_I2C_STM32_V2_TIMING.

Signed-off-by: Francois Ramu <[email protected]>
Define Macro to fix the compliance check warning :
"DEEP_INDENTATION: Too many leading tabs - consider code refactoring
in the i2c_compute_scll_sclh() function
in the i2c_compute_presc_scldel_sdadel() function

Signed-off-by: Francois Ramu <[email protected]>
Change the get_config API for the stm32 I2C V2 driver.
It will also return the value of the content of TIMING register
for the I2C V2 bus.
This is hold by a i2c_config_timing structure of the device data

Signed-off-by: Francois Ramu <[email protected]>
This sample reports the I2C configuration of the selected I2C node
from the board DTS : bitrate property of the I2C node
In case of I2C V2, it also gives the TIMINGS which has to be written
in the DTS <timings> property of the I2C V2 node.
Uses the i2c_get_config function with CONFIG_I2C_STM32_V2_TIMING.

Signed-off-by: Francois Ramu <[email protected]>
@kartben
Copy link

kartben commented Jun 12, 2024

can you submit as an actual Zephyr PR? This looks like it's already in a very decent shape :)

This guide describes the process of setting up VS Code for Zephyr's
:zephyr:code-sample:`blinky` sample in VS Code.

The instructions have been tested on Linux. In terms of the CLion workflow, the steps would be the
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clion?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I based the document on the CLion guide, then my colleague @lucbeaufils tested the instructions from scratch.
Fixed the forgotten ref

#. Build the project to generate the `compile_commands.json` file:
``west build -b native_posix_64 samples/basic/blinky``

Configure linting
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this really called "just" linting btw? given this also enables code navigation, i would have thought this has maybe another name?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rephrased to "Configure the C/C++ extension" which is more accurate.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@deribaucourt please make sure the PR you just made to Zephyr actually has the fixes you said you have applied :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks like I miss-managed my git branches ><

Generate compile commands
*************************

#The setup showcased in this document relies on the `compile_commands.json` file generated by CMake
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#The setup showcased in this document relies on the `compile_commands.json` file generated by CMake
The setup showcased in this document relies on the `compile_commands.json` file generated by CMake

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

nashif and others added 18 commits June 12, 2024 12:47
ztest now needs to more main stack size.

Signed-off-by: Anas Nashif <[email protected]>
Increase main stack size to 4096.

Signed-off-by: Anas Nashif <[email protected]>
This change marks each instance of the `gnss_xxx_config` and
`gnss_driver_api` as `const`.

By using `const`, we ensure immutability, leading to usage of only
`.rodata` and a reduction in the `.data` area.

Signed-off-by: Pisit Sawangvonganan <[email protected]>
Comment starting with "#" was causing incorrect rendering (as well as
LaTeX warnings)

Signed-off-by: Benjamin Cabé <[email protected]>
Set the bootloader choice for the
sample.modules.canopennode.program_download test case in the sample.yaml
file instead of sysbuild.conf. The reason for this change is to avoid
building MCUboot by default when using the --sysbuild option, as it may
not be compatible with all platforms. This is currently causing issues
on platforms like nRF54H20 where sysbuild is always used.

Signed-off-by: Gerard Marull-Paretas <[email protected]>
Release buffer allocated in dwc2_ctrl_feed_dout() on endpoint deactivate
to prevent the buffer from leaking on USB stack disable.

Signed-off-by: Tomasz Moń <[email protected]>
Fixed a 404 link (resource has eitrher moved or link has always been
dead)

Signed-off-by: Benjamin Cabé <[email protected]>
Fix deadlink using standard NXP download URL

Signed-off-by: Benjamin Cabé <[email protected]>
Replace dead ti.com link with a link to Farnell hosted datasheet.

Signed-off-by: Benjamin Cabé <[email protected]>
fix README to link to Power domain *tests*, not samples.

Signed-off-by: Benjamin Cabé <[email protected]>
Fixed a few occurences of file references using "cypress" instead of
"infineon"

Signed-off-by: Benjamin Cabé <[email protected]>
Fixed a few file references that were missed during hwmv2 refactoring.

Signed-off-by: Benjamin Cabé <[email protected]>
Fixed bad reference to mp2_an521 overlay file.

Signed-off-by: Benjamin Cabé <[email protected]>
Fixed a few file references that were missed during hwmv2 refactoring.

Signed-off-by: Benjamin Cabé <[email protected]>
Fixed a couple file references that were missed during PR zephyrproject-rtos#71441.

Signed-off-by: Benjamin Cabé <[email protected]>
Serpente board lives in "boards/others/", not "boards/arturo182"

Signed-off-by: Benjamin Cabé <[email protected]>
fix can-cia.org URLs as some resources have apparently moved.

Signed-off-by: Benjamin Cabé <[email protected]>
The `LOG_BACKEND_FORMAT_TIMESTAMP` Kconfig currently depends on
a list of hardcoded backends.

Let's modify it to depend on an intermediary Kconfig
`LOG_BACKEND_SUPPORTS_FORMAT_TIMESTAMP` instead, which can be
selected by a OOT log backend.

Updated all exisitng supported backends to select this new
Kconfig.

Signed-off-by: Yong Cong Sin <[email protected]>
Nicolas Pitre and others added 27 commits June 13, 2024 05:47
This code was never formally tested before... and without the preceding
commit it obviously didn't work either.

Signed-off-by: Nicolas Pitre <[email protected]>
Allow to protect the data part of each NVS item with a 32-bit CRC.
This uses 4 more bytes per NVS item.

Signed-off-by: Adrien Ricciardi <[email protected]>
Adapt the test_nvs_gc_corrupt_close_ate test to forge the data CRC.

Signed-off-by: Adrien Ricciardi <[email protected]>
The CONFIG_NVS_DATA_CRC configuration item allows to enable a CRC-32
on the data part of the NVS items.

Signed-off-by: Adrien Ricciardi <[email protected]>
Added initial version of hci cyw208xx driver

Signed-off-by: Nazar Palamar <[email protected]>
Adds missing doc on public member.

Signed-off-by: Knut Eldhuset <[email protected]>
Save precious RAM by making sure driver API and config structs are
declared as const

Signed-off-by: Benjamin Cabé <[email protected]>
Save precious RAM by declaring DRP reg->size map as const as it's
immutable

Signed-off-by: Benjamin Cabé <[email protected]>
Until Sphinx 7.4.0 is out, it's not possible to use .webp in Latex/PDF
See sphinx-doc/sphinx#12224

Signed-off-by: Benjamin Cabé <[email protected]>
There are some hardcoded numbers in the test, which here are replaced
with the proper defines.

The test will now also FAIL if we go in an inapropriate state

A guard has been added around the call to bt_le_per_adv_sync_transfer,
so that it only gets called when PAST support is available

Signed-off-by: Andries Kruithof <[email protected]>
Writing headers compatible with both C and C++ _and_ a range of
toolchains can be very challenging, see for instance long discussions in
commit c15f029 ("init.h: restore designated initializers in
SYS_INIT_NAMED()"), PR zephyrproject-rtos#69411 and a few others linked from there.

Signed-off-by: Marc Herbert <[email protected]>
This allows us to use functionality provided by slist.
First use case: Avoid adding an element twice.

Signed-off-by: Rubin Gerritsen <[email protected]>
Callbacks can only be registered once. Otherwise the slist
will become circular.

In this commit we have choosen to ignore the second registration
call if the callback has already been registed. The alternative
is to trigger an assertion. That doesn't work if the assertions
are turned off.

Signed-off-by: Rubin Gerritsen <[email protected]>
This improves consistency with other callback lists like
scan_cbs and pa_sync_cbs.

Signed-off-by: Rubin Gerritsen <[email protected]>
Returning a status code will allow the application developer
to detect logic issues.

We consider this as not breaking the API.
If `-Werror -Wunused-result` is enabled, the application developer needs
to validate the return code.

Signed-off-by: Rubin Gerritsen <[email protected]>
The polling properties are a period in us but are named as "-rate" right
now, which would imply that that's a frequency. Rename them to
"period-us" to make that unambiguous.

Signed-off-by: Fabio Baltieri <[email protected]>
Currently we launch qemu (well, "ninja run" usually) using Popen and
request stdout and stderr to be redirected into a pipe. However we never
read that pipe so the information is not captured.

Instead log directly into files that can be inspected after a failed
to to find out why qemu run failed.

Note that this is really only useful in cases where qemu either fails to
launch or crashes.

Regular test data is still handled via the qemu fifo.

Signed-off-by: Juha Kuikka <[email protected]>
When creating a BAP broadcast source with bt_bap_broadcast_source_create
only the subgroup information is stored in the streams and the remaining
BIS specific information is not stored in the stream->codec_cfg,
which it should.
Fix is to store bis specific information also in stream codec config.
Updated broadcast source BSIM test to verify above usecase.

Signed-off-by: Nithin Ramesh Myliattil <[email protected]>
The HCI command LE Read Supported States command returns
if the controller supports running the scanner and initiator
roles in parallel.

This commit utilizes this information in the host:
- It does not prevent initiating a connection when the scanner is
  running
- It does not prevent the host from restarting the background
  scanner when there the host wants to auto-initiate a connection.
- It does not stop the scanner when the host wants to auto-initiate
  a connection.

To support this feature, the scanner and initiator
always have to use the same address.
This because the HCI command LE Set Random Address
cannot be issued after the initiator or scanner has started.
1. When privacy is disabled, the scanner has to use its identity
   address to ensure it uses the same address as the initiator.
2. Only one identity is supported.

To simplify the implementation, it is a requirement to use
extended advertising commands to avoid interfering with
the random address used by the advertiser(s).

Also, it is a requirement to never use time-limited scanning,
as RPA this feature does not work when privacy is being used.
See zephyrproject-rtos#73634.

The changes in this commit will be tested out of tree as the
Zephyr Bluetooth Controller does not support this functionality.

Signed-off-by: Rubin Gerritsen <[email protected]>
Enable instruction and data cache as well as prefetch.

Signed-off-by: Erwan Gouriou <[email protected]>
Enable instruction and data cache as well as prefetch.

Signed-off-by: Erwan Gouriou <[email protected]>
Enable instruction cache as well as prefetch.

Signed-off-by: Erwan Gouriou <[email protected]>
Enable ART prefetch when not already done.

Signed-off-by: Erwan Gouriou <[email protected]>
Add Kconfigs to enable experimental subrating HCI commands.

Signed-off-by: Timothy Keys <[email protected]>
These boards fail to build for several samples & tests
which is blocking CI.
Let's provisionally disable them until the matter is properly
resolved.

See
zephyrproject-rtos#72775
zephyrproject-rtos#73443
zephyrproject-rtos#74212
for more information.

Once these issues are fixed, this change should be reverted.

Signed-off-by: Alberto Escolar Piedras <[email protected]>
Do not run the samples/drivers/flash_shell application on the
stm32h745i_disco//m4 as the flash controller is not supported yet
on the M4 core (only M7). Just like the nucleo stm32h745//m4
is excluded.
Also exclude stm32h7rs disco at the moment (still TODO).

Signed-off-by: Francois Ramu <[email protected]>
This basic guide only covers linting so far. It could be expanded in the
future to be more accurate and detailed. The current configuration
allows to navigate the code but some symbols are not recognized by the
linter, and the native compiler is always used.

Signed-off-by: Enguerrand de Ribaucourt <[email protected]>
@deribaucourt
Copy link
Member Author

Submitted to Zephyr: zephyrproject-rtos#74259

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.