In SPRESENSE SDK v2.3.0, we created two firmware with examples/fwupdate
, examples/hello
, and feature/usbmsc
.
One has not touched the source ("Hello, World!") and the other has changed the display of examples/hello
.
nsh>hello
Hello, sense!!
Packaged the original source nuttx.spk
in conjunction with loader.espk
.
$examples/fwupdate/package.sh sdk/nuttx.spk firmware/spresense/loader.espk
Pack: 118752sdk/nuttx.spk
Pack: 129968 firmware/spresense/loader.espk
====================
Created package.bin
====================
$ cp package.bin hello.bin
I wrote this to SD to see if it can be updated with fwupdate
, but NuttX does not appear to be updated correctly.
NuttShell (NSH) NuttX-10.1.0
nsh>hello
Hello, sense!!
nsh>fwupdate-p/mnt/sd0/test/hello.bin
FW Update Example!!
Free space 2314240 bytes
File: /mnt/sd0/test/hello.bin
Size: 318736
File: /mnt/sd0/test/hello.bin(0)
Size: 188752
Type—FW_SYS
->dl (0x2d03e550,65536/188752)—ret=0
->dl (0x2d03e550, 131072/188752)—ret=0
->dl (0x2d03e550, 188752/188752)—ret=0
File: /mnt/sd0/test/hello.bin(1)
Size: 129968
Type—FW_SYS
->dl (0x2d03e550, 65536/129968): ret=0
->dl (0x2d03e550, 129968/129968): ret=0
->update:ret=0
nsh>Package validation is OK.
Saving package to "loader"
NuttShell (NSH) NuttX-10.1.0
nsh>hello
Hello, sense!!
nsh>
Is there something wrong with using fwupdate
?
I think the usage is correct, but it is strange that the nuttx.spk
type is 1
.
Pack:1188752sdk/nuttx.spk
If you run the same command in your Ubuntu environment, the nuttx.spk
type is 0
, and the firmware update is working properly.
$examples/fwupdate/package.sh sdk/nuttx.spk firmware/spresense/loader.espk
Pack:0148912sdk/nuttx.spk
Pack: 129968 firmware/spresense/loader.espk
====================
Created package.bin
====================
I think the wrong type is the reason why it doesn't work.
examples/fwupdate/package.sh
is a simple script, so I checked the contents, but if the basename
command retrieves the filename and the string nuttx
, the type seems to be 0
.I'm not sure if there is an environmental dependency problem or what is causing it, but the basename
command may not be the intended behavior.
What do I see when I run the following command under the spresense
directory?The expected result is nuttx.spk
.
$cd spresense
$ basic sdk /nuttx.spk
Why don't you move the directory to spresense/sdk
and run the following command?The expected result is also nuttx.spk
.
$cdspresense/sdk
$ basename nuttx.spk
It's not a clear answer, but I think it's better to check the behavior of the script.
© 2024 OneMinuteCode. All rights reserved.