-
if i had the "BOOTLOADER=1" for some reason i get a error saying the I'm overflowing the RAM.
That is odd because this is just a bootloader = separate small app, by default mostly just Nordic code
https://github.com/espruino/Espruino/tree/master/targets/nrf5x_dfu
Well, unless you add display configuration with display type that is supported by bootloader or additional flags (like BANGLEJS) I don't see why bootloader RAM would not fit.
I mean stuff like this
https://github.com/espruino/Espruino/blob/master/boards/BANGLEJS.py#L109
https://github.com/espruino/Espruino/blob/master/boards/BANGLEJS.py#L39the RAM size in board file is just for info, what is important is the linker files, for bootloader itself the RAM you are overflowing is defined here
https://github.com/espruino/Espruino/blob/master/targetlibs/nrf5x_12/nrf5x_linkers/secure_dfu_gcc_nrf52.ld#L17
for main app withbootloader:1
in board file it is here
https://github.com/espruino/Espruino/blob/master/targetlibs/nrf5x_12/nrf5x_linkers/linker_nrf52_ble_espruino_bootloader.ld#L13
This is just for info, there is nothing needed to change there :-)
If you use SWD exclusively you may putbootloader:0
for now there for simplicity to skip building it, this will however let espruino extend to areas where bootloader normally is and possibly break it. Could work if you mass erase the device to clear bootloader address in UICR or if you modify the non bootloader espruino linker file
https://github.com/espruino/Espruino/blob/master/targetlibs/nrf5x_12/nrf5x_linkers/linker_nrf52_ble_espruino.ld#L12
to end like the one for bootloader.However maybe it is bettter to keep things as they are and figure out why it does not work.It may help to run provision file
. scripts/provision.sh BANGLEJS
to get verified gcc compiler and use that one, older or newer versions produce larger code that may not fit (into FLASH, not RAM though)As for the big picture, well, that's a great goal :-)
Sorry for being very vague and just asking single ended questions. My plan was to get something working then make a formal right up about what I'm trying to do, to see if it worth the effort. But like everything its always harder then it seems
Primary Goal
I'm trying to use @fanoush pinetime python build file and make it a "real" fake bangleOS watch.
Bigger picture
Make a way to port watches easier to bangleOS
Why
Related this topic. My thought would be if all the watches used the same bangleOS then it would be easier to make apps works across devices. There seems to be many devices that can use Espruino but are not using Bangle primarily because its hyper optimized to work with the watches being sold to actual fund this project. Which it completely fine.
How
So my thought is to have 2 builds that are function compatible with bangleOS. So the official one and the secondary one that is more like a "c compiled time driver version" that's unofficial. So there would be a layer of abstraction on each type of hardware device and at compile time you would selected the types of hardware from the configuration file. What this looks like now is just a copy of jswrap_bangle.c just stripped to the function calls and I've started to make a few stubs for the display driver.
Problem
I'm having a hard time getting to the point were i start actual trying to my idea's. Currently i can't seem to even build it. This leads the above problem i had were if i had the "BOOTLOADER=1" for some reason i get a error saying the I'm overflowing the RAM. I tried to remove just about everything and even faking the ram size in the python file, but that didn't help. So I'm thinking of starting from the top and trying it again and see what i did wrong.