API function nxboot_get_confirm was returning incorrect value if
primary image was flashed directly into the embedded flash (this
image does not have a tail, but is automatically considered as valid
and stable based on the header magic value).
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
This commit adds NuttX based bootloader with the support for image
update and recovery if not confirmed. The algorithm utilizes three
flash partitions: primary (image runs from this area), secondary
and tertiary. Secondary and tertiary areas are used for update upload
and recovery.
The update is performed by simple copy from update area to primary
area with recovery being created in recovery area if not already present.
Once image is confirmed by the user, the image in update area is
confirmed as well, update area becomes recovery area and vice versa.
This means the recovery is always present (except for the first update)
and subsequent updates just copy image from update to primary. This
makes the update significantly faster and more considerable to flash
wear while keeping the recovery/revert possibility.
A header (aligned to flash's erase size) must be added to the beginning
of the image. Python script nximage.py can be used to prepend this
header to built binary. The algorithm also uses one erase page at the
end of a partition (partition, not image!) to store flags used to
indicate image confirm status and to detect update/recovery partitions.
Any program uploading update image to the update partition has to erase
this page for the boot to work correctly!
The algorithm implementation is based on a patch initially developed
for MCUboot project but rejected by the project's maintainers
https://github.com/mcu-tools/mcuboot/pull/1902
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
Summary:
Added a limit to CJSON_NESTING_LIMIT. The default value is 1000, which can cause stack overflow in some test cases.
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
in file included from /home/work/ssd1/workspace/mirtos-ci/nuttx/../apps/frameworks/quickapp/src/framework/cdp/cdpprotocol.h:12,
from /home/work/ssd1/workspace/mirtos-ci/nuttx/../apps/frameworks/quickapp/src/framework/cdp/heapprofiler.h:3,
from /home/work/ssd1/workspace/MiRTOS-CI/apps/frameworks/quickapp/src/jse/quickjs/jse_quickjs.cpp:11:
/home/work/ssd1/workspace/MiRTOS-CI/nuttx/../apps/frameworks/quickapp/src/aiotjs.h:10:10: fatal error: app_interface.h: No such file or directory
10 | #include "app_interface.h"
| ^~~~~~~~~~~~~~~~~
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
When initialized for the first time, the memset parameter is smaller than the actual buffer size
Causes subsequent accesses to uninitialized memory in the array
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
This configuration is added to put LVGL into PSRAM for execution, and the lv_*.o file needs to be matched in the link script. Since LTO optimization will cause the file name to be modified, resulting in a matching failure, it will only take effect if LTO optimization is removed during compilation.
Link script modification: https://gerrit.odm.mioffice.cn/c/velaos/vendor/bes/framework/services_1502x/+/680741
Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
Aider is AI pair programmer: https://aider.chat
The .aider* files is not a part of NuttX but used by
Aider as temporary files.
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
This patch add some command line arguments for debug
program, then you can use it to insert watchpoint or
breakpoint to arbitrary address at runtime.
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
Sensors are just a part of uORB, and there are many virtual topics used
within uORB as well. For the library apps/system/uorb/, the nuttx/uorb.h
version is more preferable. So, move public type and definition to
nuttx/uorb.h.
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
This enhances can example application with the possibility to send
CAN FD frames if FD mode is configured. Both EDL and BRS flags are
now correctly set with the latter one configurable with application's
arguments. Also data bytes are now correctly switched to DLC.
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
wamr_custom_init is a function customized by Vela, which is used to
replace wasm_runtime_full_init to register APIs to WAMR for iwasm apps,
here we export the wamr_custom_init for none iwasm use.
Signed-off-by: liaobin1 <liaobin1@xiaomi.com>
This patch is associated with 'https://github.com/apache/nuttx/pull/13048', so it cannot be verified separately by CI. Please help to associate and review it. Thank you!
Signed-off-by: gaohedong <gaohedong@xiaomi.com>