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
boards: nuvoton: add support for numaker m2l31ki #70357
boards: nuvoton: add support for numaker m2l31ki #70357
Conversation
if BOARD_NUMAKER_M2L31KI | ||
|
||
endif # BOARD_NUMAKER_M2L31KI |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks of your advice, I deleted this redundant file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make this a webp and use https://tinypng.com/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it already made by this tool to save 13% ~ 14%.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The 1st commit jpg file was made by this webp, improved file size from 83KB to 72KB.
#address-cells = <1>; | ||
#size-cells = <1>; | ||
|
||
slot0_partition: partition@0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How are these slots used if there is no bootloader?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These proposed slots should be used by bootloader.
In \tests\drivers\flash\common\src, it will utilize the
#define TEST_AREA storage_partition.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Application has update client capacity and could download new firmware & write it into slot1 in runtime.
As while bootloader detect new firmware in slot1, it could clone into slot0 and set as active image.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this an inbuilt bootloader on the MCU itself? i.e. in mask ROM?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it's not the mask ROM.
Slot0 & Slot1 belong to APROM.
The chip has one LDROM ( loader-rom), user could program the loader (i.e small firmware).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My question is do these work out of the box or does someone need to build and load their own bootloader e.g. mcuboot? If this works out of the box then this can be marked as resolved, if they need e.g. mcuboot or another bootloader which they need to flash themselves then there should be a partition here for that bootloader
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It need one bootloader, so I add one more partition for loader in numaker_m2l31ki.dts .
Update commit f93489d.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is slot2 the bootloader? If so, how does that code partition run first? If you are using mcuboot could you copy the naming from here: https://github.com/zephyrproject-rtos/zephyr/blob/main/boards/nordic/nrf52840dk/nrf52840dk_nrf52840.dts#L277
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it could be mucboot or another simple bootloader.
Thanks and it's OK to use the same naming.
a1b7134
to
e7ac825
Compare
board_runner_args(nulink "-f") | ||
|
||
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake) | ||
include(${ZEPHYR_BASE}/boards/common/nulink.board.cmake) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hey just noticed this one:
$ west flash -r nulink
-- west flash: using runner nulink
FATAL ERROR: unknown runner "nulink"
Are you going to upstream this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So far, no plan and I remove this proprietary nulink runner.
Thanks & update commit d052b2b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok thanks for clarifying, the whole boards/common/nulink.board.cmake
should probably go as well then. That said, I think it should be acceptable to keep it as long as you contribute the west runner script as well (the file in scripts/west_commands/runners
, even if the binary it self is not distributed with the project. At least that's how nrfutil and nrfjprog works already (and probably more).
48edae5
to
d052b2b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make smaller. e.g. cwebp -q 80 m2l31ki.jpg -o m2l31ki.webp
gives a file 58% of the file size here without changing resolution
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The size improvement is excellent, I changed to m2l31ki.webp .
#address-cells = <1>; | ||
#size-cells = <1>; | ||
|
||
slot0_partition: partition@0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My question is do these work out of the box or does someone need to build and load their own bootloader e.g. mcuboot? If this works out of the box then this can be marked as resolved, if they need e.g. mcuboot or another bootloader which they need to flash themselves then there should be a partition here for that bootloader
c343213
to
701dbf9
Compare
specially developed by Nuvoton. The NuMaker-M2L31KI is based on the NuMicro® M2L31 | ||
series MCU with ARM® -Cortex®-M23 core. | ||
|
||
.. image:: ./m2l31ki.jpg |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/home/runner/_work/zephyr/zephyr/doc/_build/src/boards/nuvoton/numaker_m2l31ki/doc/index.rst:: WARNING: image file not readable: ../../../boards/nuvoton/numaker_m2l31ki/doc/m2l31ki.jpg
webp?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's webp. Sorry forget to modify index.rst
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
slot0_partition: partition@8000 { | ||
label = "image-0"; | ||
reg = <0x00008000 0x00038000>; | ||
}; | ||
slot1_partition: partition@40000 { | ||
label = "image-1"; | ||
reg = <0x00040000 0x0003e000>; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will not work for MCUboot, the sizes depend upon what operating mode you are going to use:
- swap using move: images can be same size but this is inefficient, slot0 should be larger than slot1, the most efficient size can be determined by building e.g.
samples/subsys/mgmt/mcumgr/smp_svr
for your board using sysbuild, ensuring the the MCUboot image has logging enabled and set to debug level, then when booting checking the message that will be printed on the board that mentions about slot sizes. - overwrite only: images must be same size
- XIP: images must be same size
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks your advice, I will adjust to fulfill overwrite only by tomorrow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated to let image 0 & image 1 same size.
Add new development board numaker_m2l31ki for m2l31x series. Signed-off-by: cyliang tw <cyliang@nuvoton.com>
701dbf9
to
98eef2a
Compare
This PR is to add the new development board numaker_m2l31ki for m2l31x series.
It's verified on NuMaker-M2L31KI EVB by the test code of blinky, hello_world, gpio_basic_api & flash/common.