This is exactly what I have done several days ago.
But let’s try it again on windows:
mos clone GitHub - mongoose-os-apps/demo-js: A JS-enabled demo Mongoose OS firmware app1
this is the result of
mos build --platform stm32 --build-var BOARD=NUCLEO-F746ZG
Connecting to https://build.mongoose-os.com, user test
Uploading sources (2785 bytes)
mos build
(same like in linux)
Adding api_rpc.js: 2941
Adding api_aws.js: 4538
Adding api_file.js: 2105
Adding api_math.js: 1890
Adding api_gpio.js: 3727
Adding api_watson.js: 496
Adding api_timer.js: 1750
Adding api_uart.js: SPIFFS_write failed: -10001
*** Out of space, tried to write 5772 bytes ***
make: *** [/data/fwbuild-volumes/2.20.0/apps/app1/stm32/build_contexts/build_ctx_986524279/build/objs/fw_temp/fs.bin] Error 1
make: *** Waiting for unfinished jobs....
/data/fwbuild-volumes/2.20.0/apps/app1/stm32/build_contexts/build_ctx_986524279/deps/modules/mongoose-os/platforms/stm32/Makefile.build:310: recipe for target '/data/fwbuild-volumes/2.20.0/apps/app1/stm32/build_contexts/build_ctx_986524279/build/objs/fw_temp/fs.bin' failed
make: Leaving directory '/app'
exit status 1
Command completed.
Error: /src/cli/build_remote.go:359: build failed
why is “demo-js” - which is named in
“Mongoose OS Documentation” - too big
for f746zg ?
so I’ve tried the “empty”-app and got this under windows:
mos clone GitHub - mongoose-os-apps/empty empty
mos build
$ mos build --platform stm32 --build-var BOARD=NUCLEO-F746ZG
Connecting to https://build.mongoose-os.com, user test
Uploading sources (2313 bytes)
runtime: out of memory: cannot allocate 536870912-byte block (955973632 in use)
fatal error: out of memory
runtime stack:
runtime.throw(0x1263f56, 0xd)
/usr/lib/go-1.13/src/runtime/panic.go:774 +0x64
[.....]
goroutine 41 [select, 1 minutes]:
net/http.(*persistConn).writeLoop(0x140ac1e0)
/usr/lib/go-1.13/src/net/http/transport.go:2210 +0xef
created by net/http.(*Transport).dialConn
/usr/lib/go-1.13/src/net/http/transport.go:1581 +0x92d
exit status 2
Command completed.
I saved the tmp-file and tried
(linux - as described at the beginning of this thread)
And I got:
Running /usr/bin/st-flash --serial 0x066BFF495087534867043639 write /tmp/empty_stm32_1.0_896133475/app 0x8000000
st-flash 1.7.0
2023-07-14T07:57:11 WARN usb.c: Couldn’t find any ST-Link devices
libusb: warning [libusb_exit] device 2.2 still referenced
libusb: warning [libusb_exit] device 2.1 still referenced
....
So I have tried it again on windows:
mos build --platform stm32 --board NUCLEO-F746ZG
and got:
mos flash stm32
Fetching https://github.com/mongoose-os-apps/demo-js/releases/download/2.20.0/demo-js-stm32.zip...
Error: /src/cli/ourutil/file.go:45: https://github.com/mongoose-os-apps/demo-js/releases/download/2.20.0/demo-js-stm32.zip: failed to fetch: 404 Not Found
/src/common/fwbundle/fw_bundle_zip.go:57:
/src/cli/flash.go:151: failed to load https://github.com/mongoose-os-apps/demo-js/releases/download/2.20.0/demo-js-stm32.zip
/src/cli/main.go:194: flash failed
exit status 1
Command completed.
form a linux-commandline:
MONGOOSE/mos/empty$
mos build --platform stm32 --board NUCLEO-F746ZG
Connecting to https://build.mongoose-os.com, user test
Uploading sources (2313 bytes)
Firmware saved to [....]/MONGOOSE/mos/empty/build/fw.zip
------------------------
ok....
---------------------
MONGOOSE/mos/empty$ ../mos flash stm32
Fetching https://github.com/mongoose-os-apps/demo-js/releases/download/latest/demo-js-stm32.zip...
Error: /src/cli/ourutil/file.go:45: https://github.com/mongoose-os-apps/demo-js/releases/download/latest/demo-js-stm32.zip: failed to fetch: 404 Not Found
/src/common/fwbundle/fw_bundle_zip.go:57:
/src/cli/flash.go:152: failed to load https://github.com/mongoose-os-apps/demo-js/releases/download/latest/demo-js-stm32.zip
/src/cli/main.go:194: flash failed
-------------------------
There is a file missing, a link is wrong or sth. like that.
It is impossible to build demos-js for a f746zg.
And it is impossible to flash any app on linux or even on windows.
There must be something really very wrong -
a .zip-file with a size of 385M from an “empty” app?
“GitHub - mongoose-os-apps/empty”
empty$ mos build --platform stm32 --board NUCLEO-F746ZG
Connecting to https://build.mongoose-os.com, user test
Uploading sources (2313 bytes)
Firmware saved to [....]/MONGOOSE/mos/empty/build/fw.zip
ls -lh [...]/MONGOOSE/mos/empty/build/fw.zip
-rw-rw-r-- 1 user user 385M Jul 24 09:19 [....]/MONGOOSE/mos/empty/build/fw.zip
And with such a content:
Length Date Time Name
518 2023-07-24 07:19 empty-1.0/manifest.json
402680832 2023-07-24 07:19 empty-1.0/empty.bin
402681350 2 files
0.4TB?
This sounds like a joke.