dist/tools/uf2: add target to also copy families.json file#20042
Merged
bors[bot] merged 1 commit intoRIOT-OS:masterfrom Nov 3, 2023
Merged
dist/tools/uf2: add target to also copy families.json file#20042bors[bot] merged 1 commit intoRIOT-OS:masterfrom
bors[bot] merged 1 commit intoRIOT-OS:masterfrom
Conversation
MrKevinWeiss
approved these changes
Nov 2, 2023
Contributor
MrKevinWeiss
left a comment
There was a problem hiding this comment.
ACK, tested after removing the file:
Details
weiss@mobiweiss:~/repos/RIOT$ rm dist/tools/uf2/uf2conv.py
weiss@mobiweiss:~/repos/RIOT$ BOARD=feather-nrf52840-sense make flash -C examples/hello-world/
make: Entering directory '/home/weiss/repos/RIOT/examples/hello-world'
Building application "hello-world" for "feather-nrf52840-sense" with MCU "nrf52".
"make" -C /home/weiss/repos/RIOT/pkg/cmsis/
"make" -C /home/weiss/repos/RIOT/boards/common/init
"make" -C /home/weiss/repos/RIOT/boards/feather-nrf52840-sense
"make" -C /home/weiss/repos/RIOT/core
"make" -C /home/weiss/repos/RIOT/core/lib
"make" -C /home/weiss/repos/RIOT/cpu/nrf52
"make" -C /home/weiss/repos/RIOT/cpu/cortexm_common
"make" -C /home/weiss/repos/RIOT/cpu/cortexm_common/periph
"make" -C /home/weiss/repos/RIOT/cpu/nrf52/periph
"make" -C /home/weiss/repos/RIOT/cpu/nrf52/vectors
"make" -C /home/weiss/repos/RIOT/cpu/nrf5x_common
"make" -C /home/weiss/repos/RIOT/cpu/nrf5x_common/periph
"make" -C /home/weiss/repos/RIOT/drivers
"make" -C /home/weiss/repos/RIOT/drivers/periph_common
"make" -C /home/weiss/repos/RIOT/sys
"make" -C /home/weiss/repos/RIOT/sys/auto_init
"make" -C /home/weiss/repos/RIOT/sys/auto_init/usb
"make" -C /home/weiss/repos/RIOT/sys/div
"make" -C /home/weiss/repos/RIOT/sys/event
"make" -C /home/weiss/repos/RIOT/sys/fmt
"make" -C /home/weiss/repos/RIOT/sys/isrpipe
"make" -C /home/weiss/repos/RIOT/sys/libc
"make" -C /home/weiss/repos/RIOT/sys/luid
"make" -C /home/weiss/repos/RIOT/sys/malloc_thread_safe
"make" -C /home/weiss/repos/RIOT/sys/newlib_syscalls_default
"make" -C /home/weiss/repos/RIOT/sys/preprocessor
"make" -C /home/weiss/repos/RIOT/sys/tsrb
"make" -C /home/weiss/repos/RIOT/sys/usb/usbus
"make" -C /home/weiss/repos/RIOT/sys/usb/usbus/cdc/acm
"make" -C /home/weiss/repos/RIOT/sys/usb_board_reset
text data bss dec hex filename
18424 128 4576 23128 5a58 /home/weiss/repos/RIOT/examples/hello-world/bin/feather-nrf52840-sense/hello-world.elf
stty -F /dev/ttyACM0 raw ispeed 1200 ospeed 1200 cs8 -cstopb ignpar eol 255 eof 255
sleep 3
[INFO] uf2conv.py not found - fetching it from GitHub now
CC= CFLAGS= make -C /home/weiss/repos/RIOT/dist/tools/uf2
cp /home/weiss/repos/RIOT/build/pkg/UF2/utils/uf2conv.py .
chmod a+x uf2conv.py
cp /home/weiss/repos/RIOT/build/pkg/UF2/utils/uf2families.json .
[INFO] uf2conv.py successfully fetched!
/home/weiss/repos/RIOT/dist/tools/uf2/uf2conv.py -f 0xADA52840 /home/weiss/repos/RIOT/examples/hello-world/bin/feather-nrf52840-sense/hello-world.hex --base 0x1000
Converted to uf2, output size: 37376, start address: 0x1000
Flashing /media/weiss/FTHRSNSBOOT (nRF52840-Feather-Sense)
Wrote 37376 bytes to /media/weiss/FTHRSNSBOOT/NEW.UF2
make: Leaving directory '/home/weiss/repos/RIOT/examples/hello-world'
Contributor
|
bors merge |
Contributor
|
🕐 Waiting for PR status (GitHub check) to be set, probably by CI. Bors will automatically try to run when all required PR statuses are set. |
Contributor
|
GitHub status checks took too long to complete, so bors is giving up. You can adjust bors configuration to have it wait longer if you like. |
Contributor
|
bors merge |
bors bot
added a commit
that referenced
this pull request
Nov 2, 2023
19932: tests/periph: Add test using the Peripheral Selftest Shield r=MrKevinWeiss a=maribu
### Contribution description
This adds a test that makes use of the peripheral selftesting shield.
#### ToDo
- [x] Add doc
### Testing procedure
- grab an Arduino UNO compatible board that has the Arduino pin map feature
- connect it to the testing shield
- configure the testing shield
- make sure the VCC selector matches the logic level of the board (3.3V and 5V are the only options)
- enabled all the "loops" needed for testing on SW1
- it could be that the UART on D0, D1 is used for stdio. In that case, do *NOT* close the loop
- flash and run the test application
### Issues/PRs references
none
19992: sys/psa_crypto: Fix build problems r=MrKevinWeiss a=Einhornhool
### Contribution description
This fixes several problems:
#### 1. Empty union in cipher context when `MODULE_PSA_CIPHER` is not selected.
PSA operations are now separated into modules. Functions and contexts are only built when the corresponding module is selected. This way there won't be problems with missing or unitialized structures in unused modules anymore.
#### 2. Zero-size array when using secure elements and `PSA_MAX_KEY_DATA_SIZE == 0`
I added a condition to the `psa_key_slot_t` structure in `psa_key_slot_management.h`.
Also the existence of key slot management functions and key slot structures now depends on the number of allocated key slots instead of selected modules.
This way key structures will not exist unless they are used.
### Testing procedure
Add the following to `examples/hello_world/Makefile` and call make :
```
USEMODULE += psa_crypto
USEMODULE += psa_hash
USEMODULE += psa_hash_sha_256
USEMODULE += psa_secure_element
```
Output on Master:
```
"make" -C /home/lena/work/RIOT/boards/common/init
"make" -C /home/lena/work/RIOT/boards/native
"make" -C /home/lena/work/RIOT/boards/native/drivers
"make" -C /home/lena/work/RIOT/core
"make" -C /home/lena/work/RIOT/core/lib
"make" -C /home/lena/work/RIOT/cpu/native
"make" -C /home/lena/work/RIOT/cpu/native/periph
"make" -C /home/lena/work/RIOT/cpu/native/stdio_native
"make" -C /home/lena/work/RIOT/drivers
"make" -C /home/lena/work/RIOT/drivers/periph_common
"make" -C /home/lena/work/RIOT/sys
"make" -C /home/lena/work/RIOT/sys/auto_init
"make" -C /home/lena/work/RIOT/sys/libc
"make" -C /home/lena/work/RIOT/sys/luid
"make" -C /home/lena/work/RIOT/sys/preprocessor
"make" -C /home/lena/work/RIOT/sys/psa_crypto
In file included from /home/lena/work/RIOT/sys/include/psa_crypto/psa/crypto.h:39,
from /home/lena/work/RIOT/sys/psa_crypto/psa_crypto_algorithm_dispatch.c:23:
/home/lena/work/RIOT/sys/include/psa_crypto/psa/crypto_struct.h:137:11: error: union has no members [-Werror=pedantic]
137 | union cipher_context {
| ^~~~~~~~~~~~~~
In file included from /home/lena/work/RIOT/sys/psa_crypto/include/psa_crypto_operation_encoder.h:32,
from /home/lena/work/RIOT/sys/psa_crypto/psa_crypto_algorithm_dispatch.c:28:
/home/lena/work/RIOT/sys/psa_crypto/include/psa_crypto_slot_management.h:82:17: error: ISO C forbids zero-size array ‘data’ [-Werror=pedantic]
82 | uint8_t data[PSA_MAX_KEY_DATA_SIZE]; /**< Key data buffer */
| ^~~~
cc1: all warnings being treated as errors
make[3]: *** [/home/lena/work/RIOT/Makefile.base:146: /home/lena/work/RIOT/examples/hello-world/bin/native/psa_crypto/psa_crypto_algorithm_dispatch.o] Error 1
make[2]: *** [/home/lena/work/RIOT/Makefile.base:31: ALL--/home/lena/work/RIOT/sys/psa_crypto] Error 2
make[1]: *** [/home/lena/work/RIOT/Makefile.base:31: ALL--/home/lena/work/RIOT/sys] Error 2
make: *** [/home/lena/work/RIOT/examples/hello-world/../../Makefile.include:761: application_hello-world.module] Error 2
```
Output with fixes:
```
"make" -C /home/lena/work/RIOT/boards/common/init
"make" -C /home/lena/work/RIOT/boards/native
"make" -C /home/lena/work/RIOT/boards/native/drivers
"make" -C /home/lena/work/RIOT/core
"make" -C /home/lena/work/RIOT/core/lib
"make" -C /home/lena/work/RIOT/cpu/native
"make" -C /home/lena/work/RIOT/cpu/native/periph
"make" -C /home/lena/work/RIOT/cpu/native/stdio_native
"make" -C /home/lena/work/RIOT/drivers
"make" -C /home/lena/work/RIOT/drivers/periph_common
"make" -C /home/lena/work/RIOT/sys
"make" -C /home/lena/work/RIOT/sys/auto_init
"make" -C /home/lena/work/RIOT/sys/libc
"make" -C /home/lena/work/RIOT/sys/luid
"make" -C /home/lena/work/RIOT/sys/preprocessor
"make" -C /home/lena/work/RIOT/sys/psa_crypto
"make" -C /home/lena/work/RIOT/sys/psa_crypto/psa_key_slot_mgmt
"make" -C /home/lena/work/RIOT/sys/psa_crypto/psa_se_mgmt
"make" -C /home/lena/work/RIOT/sys/random
/usr/bin/ld: warning: /home/lena/work/RIOT/examples/hello-world/bin/native/hello-world.elf has a LOAD segment with RWX permissions
text data bss dec hex filename
29764 584 47856 78204 1317c /home/lena/work/RIOT/examples/hello-world/bin/native/hello-world.elf
```
20042: dist/tools/uf2: add target to also copy families.json file r=MrKevinWeiss a=MichelRottleuthner
### Contribution description
The updated UF2 pkg (#20035) stores the family ID in an external .json file. I overlooked that and flashing fails if this file is not present. This PR fixes it by also copying the json into the tool folder.
### Testing procedure
Check if the `feather-nrf52840-sense` can be flashed when the new UF2 pkg is cloned freshly.
### Issues/PRs references
Fixes a regression introduced with #20035
Co-authored-by: Marian Buschsieweke <[email protected]>
Co-authored-by: Lena Boeckmann <[email protected]>
Co-authored-by: Michel Rottleuthner <[email protected]>
Contributor
|
Build failed (retrying...): |
bors bot
added a commit
that referenced
this pull request
Nov 3, 2023
19992: sys/psa_crypto: Fix build problems r=MrKevinWeiss a=Einhornhool
### Contribution description
This fixes several problems:
#### 1. Empty union in cipher context when `MODULE_PSA_CIPHER` is not selected.
PSA operations are now separated into modules. Functions and contexts are only built when the corresponding module is selected. This way there won't be problems with missing or unitialized structures in unused modules anymore.
#### 2. Zero-size array when using secure elements and `PSA_MAX_KEY_DATA_SIZE == 0`
I added a condition to the `psa_key_slot_t` structure in `psa_key_slot_management.h`.
Also the existence of key slot management functions and key slot structures now depends on the number of allocated key slots instead of selected modules.
This way key structures will not exist unless they are used.
### Testing procedure
Add the following to `examples/hello_world/Makefile` and call make :
```
USEMODULE += psa_crypto
USEMODULE += psa_hash
USEMODULE += psa_hash_sha_256
USEMODULE += psa_secure_element
```
Output on Master:
```
"make" -C /home/lena/work/RIOT/boards/common/init
"make" -C /home/lena/work/RIOT/boards/native
"make" -C /home/lena/work/RIOT/boards/native/drivers
"make" -C /home/lena/work/RIOT/core
"make" -C /home/lena/work/RIOT/core/lib
"make" -C /home/lena/work/RIOT/cpu/native
"make" -C /home/lena/work/RIOT/cpu/native/periph
"make" -C /home/lena/work/RIOT/cpu/native/stdio_native
"make" -C /home/lena/work/RIOT/drivers
"make" -C /home/lena/work/RIOT/drivers/periph_common
"make" -C /home/lena/work/RIOT/sys
"make" -C /home/lena/work/RIOT/sys/auto_init
"make" -C /home/lena/work/RIOT/sys/libc
"make" -C /home/lena/work/RIOT/sys/luid
"make" -C /home/lena/work/RIOT/sys/preprocessor
"make" -C /home/lena/work/RIOT/sys/psa_crypto
In file included from /home/lena/work/RIOT/sys/include/psa_crypto/psa/crypto.h:39,
from /home/lena/work/RIOT/sys/psa_crypto/psa_crypto_algorithm_dispatch.c:23:
/home/lena/work/RIOT/sys/include/psa_crypto/psa/crypto_struct.h:137:11: error: union has no members [-Werror=pedantic]
137 | union cipher_context {
| ^~~~~~~~~~~~~~
In file included from /home/lena/work/RIOT/sys/psa_crypto/include/psa_crypto_operation_encoder.h:32,
from /home/lena/work/RIOT/sys/psa_crypto/psa_crypto_algorithm_dispatch.c:28:
/home/lena/work/RIOT/sys/psa_crypto/include/psa_crypto_slot_management.h:82:17: error: ISO C forbids zero-size array ‘data’ [-Werror=pedantic]
82 | uint8_t data[PSA_MAX_KEY_DATA_SIZE]; /**< Key data buffer */
| ^~~~
cc1: all warnings being treated as errors
make[3]: *** [/home/lena/work/RIOT/Makefile.base:146: /home/lena/work/RIOT/examples/hello-world/bin/native/psa_crypto/psa_crypto_algorithm_dispatch.o] Error 1
make[2]: *** [/home/lena/work/RIOT/Makefile.base:31: ALL--/home/lena/work/RIOT/sys/psa_crypto] Error 2
make[1]: *** [/home/lena/work/RIOT/Makefile.base:31: ALL--/home/lena/work/RIOT/sys] Error 2
make: *** [/home/lena/work/RIOT/examples/hello-world/../../Makefile.include:761: application_hello-world.module] Error 2
```
Output with fixes:
```
"make" -C /home/lena/work/RIOT/boards/common/init
"make" -C /home/lena/work/RIOT/boards/native
"make" -C /home/lena/work/RIOT/boards/native/drivers
"make" -C /home/lena/work/RIOT/core
"make" -C /home/lena/work/RIOT/core/lib
"make" -C /home/lena/work/RIOT/cpu/native
"make" -C /home/lena/work/RIOT/cpu/native/periph
"make" -C /home/lena/work/RIOT/cpu/native/stdio_native
"make" -C /home/lena/work/RIOT/drivers
"make" -C /home/lena/work/RIOT/drivers/periph_common
"make" -C /home/lena/work/RIOT/sys
"make" -C /home/lena/work/RIOT/sys/auto_init
"make" -C /home/lena/work/RIOT/sys/libc
"make" -C /home/lena/work/RIOT/sys/luid
"make" -C /home/lena/work/RIOT/sys/preprocessor
"make" -C /home/lena/work/RIOT/sys/psa_crypto
"make" -C /home/lena/work/RIOT/sys/psa_crypto/psa_key_slot_mgmt
"make" -C /home/lena/work/RIOT/sys/psa_crypto/psa_se_mgmt
"make" -C /home/lena/work/RIOT/sys/random
/usr/bin/ld: warning: /home/lena/work/RIOT/examples/hello-world/bin/native/hello-world.elf has a LOAD segment with RWX permissions
text data bss dec hex filename
29764 584 47856 78204 1317c /home/lena/work/RIOT/examples/hello-world/bin/native/hello-world.elf
```
20042: dist/tools/uf2: add target to also copy families.json file r=MrKevinWeiss a=MichelRottleuthner
### Contribution description
The updated UF2 pkg (#20035) stores the family ID in an external .json file. I overlooked that and flashing fails if this file is not present. This PR fixes it by also copying the json into the tool folder.
### Testing procedure
Check if the `feather-nrf52840-sense` can be flashed when the new UF2 pkg is cloned freshly.
### Issues/PRs references
Fixes a regression introduced with #20035
Co-authored-by: Lena Boeckmann <[email protected]>
Co-authored-by: Michel Rottleuthner <[email protected]>
Contributor
|
Build failed (retrying...): |
Contributor
|
Build succeeded! The publicly hosted instance of bors-ng is deprecated and will go away soon. If you want to self-host your own instance, instructions are here. If you want to switch to GitHub's built-in merge queue, visit their help page. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contribution description
The updated UF2 pkg (#20035) stores the family ID in an external .json file. I overlooked that and flashing fails if this file is not present. This PR fixes it by also copying the json into the tool folder.
Testing procedure
Check if the
feather-nrf52840-sensecan be flashed when the new UF2 pkg is cloned freshly.Issues/PRs references
Fixes a regression introduced with #20035