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

Convert nrf51, nrf52820, nrf52832, nrf52840, nrf5340, nrf9160 boards #4

Conversation

nordicjm
Copy link

@nordicjm nordicjm commented Jan 2, 2024

  • nrf51 (Only 1 board is still outstanding, 96b_carbon_nrf51, this is because it is a dual SoC board and requires STM32 SoC v2 support to convert)
  • nrf52805
  • nrf52810
  • nrf52820
  • nrf52832
  • nrf52840
  • nrf5340
  • nrf9131
  • nrf9151
  • nrf9160
  • nrf9161

@nordicjm nordicjm force-pushed the nrf52_adopt_soc_scheme_v2_more branch 2 times, most recently from b18c88d to 2300fbd Compare January 2, 2024 12:18
@nordicjm nordicjm changed the title Convert nrf52832 boards Convert nrf51, nrf52820, nrf52832, nrf52840 boards Jan 2, 2024
@nordicjm nordicjm force-pushed the nrf52_adopt_soc_scheme_v2_more branch from dcef25d to 49b1fc8 Compare January 2, 2024 13:23
@nordicjm nordicjm changed the title Convert nrf51, nrf52820, nrf52832, nrf52840 boards Convert nrf51, nrf52820, nrf52832, nrf52840, nrf9160 boards Jan 4, 2024
@nordicjm nordicjm changed the title Convert nrf51, nrf52820, nrf52832, nrf52840, nrf9160 boards Convert nrf51, nrf52820, nrf52832, nrf52840, nrf5340, nrf9160 boards Jan 4, 2024
@tejlmand
Copy link
Owner

tejlmand commented Jan 5, 2024

From compliance:

Warning: boards/v2/laird_connect/bl5340_dvk/Kconfig.bl5340_dvk:7 please, no spaces at the start of a line
....

I think those Kconfigs would be nice to address before merging, to minimize number of commits / changes on each file during porting.

get_maintainer.MaintainersError: MAINTAINERS.yml: glob pattern 'boards/arm/qemu_cortex_m0/' in 'files' in area 'ARM arch' does not match any files

Can be ignored, let's make a MAINTAINERS update in the branch when porting has completed.

Copy link
Owner

@tejlmand tejlmand left a comment

Choose a reason for hiding this comment

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

Generally good looking 👍 .

Noticed a couple of minors which seems to be a repeating pattern, so only mention them once.

Only major that seems to need fixing before merging would be missing handling of board revisions.
The minor can be addressed later (but also done immediately if you like)

name: ubx_bmd300eval
vendor: U-blox
socs:
- name: nrf52832
Copy link
Owner

Choose a reason for hiding this comment

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

minor, but seems a newline is missing (editor setting ?)

Copy link
Author

Choose a reason for hiding this comment

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

these were generated by the v1 -> v2 bash script :)

Copy link
Owner

Choose a reason for hiding this comment

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

(editor script setting ?)

Fixed 😆

config BOARD_UBX_BMD300EVAL
bool
default y
select SOC_SERIES_NRF52X
Copy link
Owner

Choose a reason for hiding this comment

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

with soc series no longer a choice we should actually have the soc selecting the series and avoid the need for this selection. (something not possible in old hwm as you cannot select a choice entry in Kconfig)

Comment on lines 7 to 8
bool
default y
Copy link
Owner

Choose a reason for hiding this comment

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

@@ -0,0 +1,8 @@
board:
name: nrf9160dk
vendor: Nordic Semiconductor
Copy link
Owner

Choose a reason for hiding this comment

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

what happened to revisions ?

Comment on lines +3 to +4
if(("${BOARD_IDENTIFIER}" STREQUAL "/nrf5340/cpuapp" OR "${BOARD_IDENTIFIER}" STREQUAL "/nrf5340/cpuapp/ns")
AND CONFIG_BOARD_ENABLE_CPUNET)
Copy link
Owner

Choose a reason for hiding this comment

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

this is board specific CMakeLists.txt, and only sourced when this board is building, so we could reduce check to:

Suggested change
if(("${BOARD_IDENTIFIER}" STREQUAL "/nrf5340/cpuapp" OR "${BOARD_IDENTIFIER}" STREQUAL "/nrf5340/cpuapp/ns")
AND CONFIG_BOARD_ENABLE_CPUNET)
if(CONFIG_SOC_NRF5340_CPUAPP_QKAA AND CONFIG_BOARD_ENABLE_CPUNET)

(not required for merging, but could be considered in case file has to be touched for other reasons)
Same comment goes for other cmake files in commit.

@@ -0,0 +1,5 @@
board:
name: actinius_icarus
vendor: Actinius
Copy link
Owner

Choose a reason for hiding this comment

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

what about revisions ?

@tejlmand tejlmand force-pushed the nrf52_adopt_soc_scheme_v2 branch 2 times, most recently from 2b6fb63 to ed31c97 Compare January 5, 2024 13:11
@nordicjm nordicjm force-pushed the nrf52_adopt_soc_scheme_v2_more branch from f405e1e to 2134889 Compare January 5, 2024 14:59
@tejlmand tejlmand force-pushed the nrf52_adopt_soc_scheme_v2 branch from ed31c97 to 8487e7f Compare January 8, 2024 09:12
@nordicjm nordicjm force-pushed the nrf52_adopt_soc_scheme_v2_more branch from 2134889 to 4ef0f0b Compare January 8, 2024 09:55
@tejlmand tejlmand force-pushed the nrf52_adopt_soc_scheme_v2 branch from 8487e7f to 8034bac Compare January 9, 2024 11:14
@nordicjm nordicjm force-pushed the nrf52_adopt_soc_scheme_v2 branch from 8034bac to e6ff528 Compare January 9, 2024 12:28
@nordicjm nordicjm force-pushed the nrf52_adopt_soc_scheme_v2_more branch 2 times, most recently from 165f824 to 7efbb6d Compare January 9, 2024 15:42
@nordicjm nordicjm force-pushed the nrf52_adopt_soc_scheme_v2 branch from e6ff528 to 0b7ce66 Compare January 22, 2024 08:18
@nordicjm nordicjm force-pushed the nrf52_adopt_soc_scheme_v2_more branch 2 times, most recently from 4f39e87 to 483cffb Compare January 22, 2024 08:40
@nordicjm nordicjm requested a review from tejlmand January 22, 2024 08:45
@nordicjm nordicjm force-pushed the nrf52_adopt_soc_scheme_v2 branch 4 times, most recently from 361a5c6 to cb6a26c Compare January 22, 2024 11:08
Converts the board to hwmv2

Signed-off-by: Jamie McCrae <[email protected]>
Converts the board to hwmv2

Signed-off-by: Jamie McCrae <[email protected]>
Converts the board to hwmv2

Signed-off-by: Jamie McCrae <[email protected]>
Converts the board to hwmv2

Signed-off-by: Jamie McCrae <[email protected]>
Converts the board to hwmv2

Signed-off-by: Jamie McCrae <[email protected]>
Converts the board to hwmv2

Signed-off-by: Jamie McCrae <[email protected]>
Converts the board to hwmv2

Signed-off-by: Jamie McCrae <[email protected]>
Converts the board to hwmv2

Signed-off-by: Jamie McCrae <[email protected]>
Converts the board to hwmv2

Signed-off-by: Jamie McCrae <[email protected]>
Converts the board to hwmv2

Signed-off-by: Jamie McCrae <[email protected]>
Converts the board to hwmv2

Signed-off-by: Jamie McCrae <[email protected]>
Converts the board to hwmv2

Signed-off-by: Jamie McCrae <[email protected]>
Converts the board to hwmv2

Signed-off-by: Jamie McCrae <[email protected]>
Converts the board to hwmv2

Signed-off-by: Jamie McCrae <[email protected]>
Converts the board to hwmv2

Signed-off-by: Jamie McCrae <[email protected]>
Converts the board to hwmv2

Signed-off-by: Jamie McCrae <[email protected]>
Converts the board to hwmv2

Signed-off-by: Jamie McCrae <[email protected]>
Converts the board to hwmv2

Signed-off-by: Jamie McCrae <[email protected]>
Converts the board to hwmv2

Signed-off-by: Jamie McCrae <[email protected]>
Converts the board to hwmv2

Signed-off-by: Jamie McCrae <[email protected]>
Converts the board to hwmv2

Signed-off-by: Jamie McCrae <[email protected]>
Converts the board to hwmv2

Signed-off-by: Jamie McCrae <[email protected]>
Converts the board to hwmv2

Signed-off-by: Jamie McCrae <[email protected]>
Converts the board to hwmv2

Signed-off-by: Jamie McCrae <[email protected]>
Converts the board to hwmv2

Signed-off-by: Jamie McCrae <[email protected]>
Converts the board to hwmv2

Signed-off-by: Jamie McCrae <[email protected]>
Converts the board to hwmv2

Signed-off-by: Jamie McCrae <[email protected]>
Converts the board to hwmv2

Signed-off-by: Jamie McCrae <[email protected]>
Moves this SoC over from v1 to v2 so it can be used in HWMv2

Signed-off-by: Jamie McCrae <[email protected]>
Converts the board to hwmv2

Signed-off-by: Jamie McCrae <[email protected]>
Converts the board to hwmv2

Signed-off-by: Jamie McCrae <[email protected]>
@nordicjm nordicjm force-pushed the nrf52_adopt_soc_scheme_v2_more branch from 483cffb to fce1f83 Compare January 22, 2024 11:13
@tejlmand tejlmand merged this pull request into tejlmand:nrf52_adopt_soc_scheme_v2 Jan 23, 2024
8 of 10 checks passed
tejlmand pushed a commit that referenced this pull request Oct 30, 2024
hci_packet_complete(buf, buf_size) should check whether buf_size is
enough.
For instance, hci_packet_complete can receive buf with buf_size 1,
leading to the buffer overflow in cmd->param_len, which is buf[3].
This can happen when rx_thread() receives two frames in 512 bytes
and the first frame size is 511. Then, rx_thread() will call
hci_packet_complete() with 1.

==5==ERROR: AddressSanitizer: global-buffer-overflow on address
0x000000ad81c2 at pc 0x0000005279b3 bp 0x7fffe74f5b70 sp 0x7fffe74f5b68

READ of size 2 at 0x000000ad81c2 thread T6
    #0 0x5279b2  (/root/zephyr.exe+0x5279b2)
    #1 0x4d697d  (/root/zephyr.exe+0x4d697d)
    #2 0x7ffff60e5daa  (/lib/x86_64-linux-gnu/libc.so.6+0x89daa)
(BuildId: 2e01923fea4ad9f7fa50fe24e0f3385a45a6cd1c)

0x000000ad81c2 is located 2 bytes to the right of global variable
'rx_thread.frame' defined in 'zephyr/drivers/bluetooth/hci/userchan.c'
(0xad7fc0) of size 512
SUMMARY: AddressSanitizer: global-buffer-overflow
(/root/zephyr.exe+0x5279b2)
Thread T6 created by T2 here:
    #0 0x48c17c  (/root/zephyr.exe+0x48c17c)
    #1 0x530192  (/root/zephyr.exe+0x530192)
    #2 0x4dcc22  (/root/zephyr.exe+0x4dcc22)

Thread T2 created by T1 here:
    #0 0x48c17c  (/root/zephyr.exe+0x48c17c)
    #1 0x530192  (/root/zephyr.exe+0x530192)
    #2 0x4dcc22  (/root/zephyr.exe+0x4dcc22)

Thread T1 created by T0 here:
    #0 0x48c17c  (/root/zephyr.exe+0x48c17c)
    #1 0x52f36c  (/root/zephyr.exe+0x52f36c)
    #2 0x5371dc  (/root/zephyr.exe+0x5371dc)
    #3 0x5312a6  (/root/zephyr.exe+0x5312a6)
    #4 0x52ed7b  (/root/zephyr.exe+0x52ed7b)
    #5 0x52eddd  (/root/zephyr.exe+0x52eddd)
    #6 0x7ffff6083c89  (/lib/x86_64-linux-gnu/libc.so.6+0x27c89)
(BuildId: 2e01923fea4ad9f7fa50fe24e0f3385a45a6cd1c)

==5==ABORTING

Signed-off-by: Sungwoo Kim <[email protected]>
@nordicjm nordicjm deleted the nrf52_adopt_soc_scheme_v2_more branch January 27, 2025 10:44
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.

2 participants