7 years, 5 months ago.

how to build mbed-os without rtos?

I'm building a lib for my LPC1347 target with mbed-os. But the resultiing size for the .bss is too large. The size of the same code with an older lib without rtos was ok. How can I 'turn off' the rtos feature in mbed-os 5 to get the size of mbed2 or mbed-classic ?

1 Answer

7 years, 5 months ago.

Are you using anything specific in mbed-os-5? If not, you can delete the "mbed" folder and import "mbed-dev" as a library. This is *similar* to the older mbed2/classic code. Be aware that the compiler version has changed and it's building differently than 4-6 months ago.

thanks. I'm not yet using the rtos, but it should be possible. I'm building the mbed-os library from the mbed-os-master. Then I use this in a lpcxpresso project.This compiles already, but I don't know where the thread_stack_main is declared. I found it in RTX_CM_lib.h and change the size. Then I rebuild the mbed-os library, but the size of thread_stack_main remains 0x1000 in the mapfile. This is driving me nuts.

posted by Johannes Stratmann 01 Nov 2016

oooh damned, even when I delete the libmbed-os.a the .bss overflows... I have simply used the wrong library path, it pointed to another project in the workspace with name mbed-os. Now the .bss is ok after reducing the os-thread count, but still some strange linker errors: ./src/main.o:(.rodata._ZTI4I2C2[_ZTI4I2C2]+0x8): undefined reference to `typeinfo for mbed::I2C' ./src/main.o:(.rodata._ZTI8BurstSPI[_ZTI8BurstSPI]+0x8): undefined reference to `typeinfo for mbed::SPI' ./Libs/Adafruit_GFX/Adafruit_GFX.o:(.rodata._ZTI12Adafruit_GFX+0x8): undefined reference to `typeinfo for mbed::Stream'

posted by Johannes Stratmann 01 Nov 2016