Go Down

Topic: STM32F103: "Program too big. The size is 77872 bytes (of a 65536 byte maximum)." (Read 110 times) previous topic - next topic

DocStein99

I loaded the STM32 usb-bootloader, and ran the blink application with success for the first time tonight.  So now I want to make a real program.  I chose to try and compile this sBus test example (remote control receiver) library found here:

sBus library

I select the same board-type as I did with the blink-test, and POOF!  ERROR PROGRAM TOO BIG!

So, I have a long list of problems that probably has something to do with converting this example from arduino 8-bit to stm32?  Not sure why it is using 70k of memory.

I am actually compiling in Visual Studio, using the Visual Micro extension.    Maybe there is a function in this library that does not translate correctly ?  the .h and .cpp is only like 300 or 400 lines of code.  Project compiles without issue on Arduino328 nano board with plenty of memory to spare.  STM32 has -- what, twice or 4 times as much memory ?!?!? 

I was wondering if anyone had advice, please.  How do I get a read-out or trace of WHAT was compiled, and the memory usage - where it went, what functions are using and declaring memory ?

DocStein99

Wait a minute...  Ok, looks like for reasons unknown, the tutorial I was following tell me compile board "GENERIC STM32F103C SERIES".  I poke around and find reference to "MAPLE MINI" looks like the same $2.00 board I have on some web pages, and other pages it is different.  Then this hidden detail:

Most STM32F103C8T6 processors actually seem to have 128k Flash, like the STM32F103CBT6

Wiki reference


So, I select "MAPLE MINI" from the drop-down board list, and the program compiles - uploads and runs.  !?!?!?  I thought the compiler checked the board it was connected before uploading to verify it was compatible?  I guess not - I suppose it would let me compile anything and upload it to anything.  Confused.

Go Up