7 years, 7 months ago.

Not all Nucleo L011K4 examples work, how can I work with this board?

So I'm trying to code a simple I2C sensor application for the Nucleo L011k4 board but anything more complicated than "int main" just keeps me locked in a L6406E/L6220E errors loop.

How can I code anything useful with this little guy? I mean, its 16KB flash is small but not that small!

Thank you.

1 Answer

7 years, 7 months ago.

https://developer.mbed.org/questions/75150/Impossible-to-download-mbed-bin-file-in-/

Why not consider to use the STM32Cube tool and the Keil compiler. A bit more complicated to use but then you can have more control over the compiler. Other thoughts are to remove the fat out of the mbed tool but excluding parts that are not being used. Perhaps then you can trim down the compiled filesize.

https://developer.mbed.org/forum/helloworld/topic/17062/?page=1#comment-52161

Accepted Answer

Yes! I had considered that but since mbed makes everything so easy I thought I would give it a try first, considering it's an official mbed product. I guess I have to reconsider.

Thanks for your answer!

posted by Juampe Lopez 02 May 2017

-

For what it is worth - added your board to my mbed account -> imported the mbed LED blinky example and compiled to a 14k filesize. Then removed the mbed library and imported instead mbed-dev -> compiled again to be sure nothing is broken -> 14k filesize again with the same target. Then searched out the string for DEVICE_STDIO_MESSAGES and removed any code that will be included for this define. Found such conditional compiles about 3-4 times and removed the code that will be included for this define -> code recompiled is now 11.4k. So if you want to quickly prototype with this specific target, that is a possible option. STM32Cube has its own pain and we recall staring at hundreds of lines of source code for a simple I2C bus master and in the end, wrote our own using bit-bang methods and worked fine for our project.

posted by Sanjiv Bhatia 02 May 2017