only 50% of program gets compiled!!!!

Post here all questions related to STM32 core if you can't find a relevant section!
alila.jj@gmail.com
Posts: 6
Joined: Tue Dec 21, 2021 9:29 pm

only 50% of program gets compiled!!!!

Post by alila.jj@gmail.com »

hello to all of you professionals in STM32
I made a big project on blackpill 128kb flash and it was fine
I reinstalledy windows and now a weird problem happens:
when I compile and upload
only 50% of the source gets compiled and uploaded (without any errors!!!!)
and lcd of my project only shows half of the HMI and doesnt have amy functionality which is SOOO WEIRRRRD
have you any suggestions? what should I do now?
User avatar
fpiSTM
Posts: 1723
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: only 50% of program gets compiled!!!!

Post by fpiSTM »

Hi. Could you tell us your setup? Arduino IDE version, core version, ... all relevant information which can help us.
alila.jj@gmail.com
Posts: 6
Joined: Tue Dec 21, 2021 9:29 pm

Re: only 50% of program gets compiled!!!!

Post by alila.jj@gmail.com »

thanks for your attention dear ❤️
well I dont know the last working version of stm32duino pachage or IDE
bu I've tried most of them and I failed
versions are:
1.8.5
1.8.15
also the last version
and stm32duino pachages were:
2.1
2.0
1.9
1.8
1.0 (which didnt have the stm32f103 at all)
and about the setup I have a working source code(which uses DHT Library and eSpi library by bodmer and some others )
I tried one of the examples of tft_espi and it worked!!!
but because my code is 70kb almost and its heavier tban the example gets half-compiled and uses only 50% of the flash memory and works but I lost lots of functions in my program which they dont work and touch screen doesnt respond at all
my board: stm32f103c8t6 with 128kb flash
my lcd: ili9341 tft spi lcd with touch 3.2"
and... yeah thats all about it
what should ai do to be able to compile 70kb of the source just like before I changed my windows?
ag123
Posts: 1653
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

Re: only 50% of program gets compiled!!!!

Post by ag123 »

try an upgrade to 2.2, it is just released ;)
and select -Os (optimize for smallest size) for the build
User avatar
fpiSTM
Posts: 1723
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: only 50% of program gets compiled!!!!

Post by fpiSTM »

F103C8 has only 64k of flash.... even if some has 128k. So generic f103c8 defines 64k. Try with the f103cb
alila.jj@gmail.com
Posts: 6
Joined: Tue Dec 21, 2021 9:29 pm

Re: only 50% of program gets compiled!!!!

Post by alila.jj@gmail.com »

hello thanks for your advice
I tested it as I wrote in top
2.1
2.0
1.9
all of them had the same problem which is really weird
at least it should warn me that sketch is using 70kb and flash size is 128kb
despite the fact that I had programmed my code successfully on this exact micro before and it was always running fine cuz it has 128kb
and issues started to appear after reinstallation of my windows 10
idk what to do really
this problem made me really exhausted
alila.jj@gmail.com
Posts: 6
Joined: Tue Dec 21, 2021 9:29 pm

Re: only 50% of program gets compiled!!!!

Post by alila.jj@gmail.com »

yeah they have 64 by default
but you know my black pill had 128 from beginning and I even tried uploading a dump 70kb from the last successful compile that I had using st-link util and it works
but the problem is even by selecting the cb/c8 with 128kb the program half-compiles which is a really rare and ridiculous situation
now Im even wondering why on earth it doesnt give me errors that you havent sufficient flash memory
it compiles 64 kb of the source and then it programs (uploads) it LOL :D
ag123
Posts: 1653
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

Re: only 50% of program gets compiled!!!!

Post by ag123 »

select stm32f103cb should do, but make sure you really have 128 kb flash
alila.jj@gmail.com
Posts: 6
Joined: Tue Dec 21, 2021 9:29 pm

Re: only 50% of program gets compiled!!!!

Post by alila.jj@gmail.com »

hi again
this is the output of the compiler/programmer and Im using cb
===============================================================================================================================
===============================================================================================================================
===============================================================================================================================

Sketch uses 65644 bytes (50%) of program storage space. Maximum is 131072 bytes.
Global variables use 2988 bytes (14%) of dynamic memory, leaving 17492 bytes for local variables. Maximum is 20480 bytes.
-------------------------------------------------------------------
STM32CubeProgrammer v2.6.0
-------------------------------------------------------------------

ST-LINK SN : 48FF70066578555533420567
ST-LINK FW : V2J37S7
Board : --
Voltage : 3.26V
SWD freq : 4000 KHz
Connect mode: Under Reset
Reset mode : Hardware reset
Device ID : 0x410
Revision ID : Rev X
Device name : STM32F101/F102/F103 Medium-density
Flash size : 128 KBytes
Device type : MCU
Device CPU : Cortex-M3



Memory Programming ...
Opening and parsing file: LCD_HMI_Software.ino.bin
File : LCD_HMI_Software.ino.bin
Size : 65952 Bytes
Address : 0x08000000


Erasing memory corresponding to segment 0:
Erasing internal memory sectors [0 64]
Download in Progress:


File download complete
Time elapsed during download operation: 00:00:01.566

RUNNING Program ...
Address: : 0x8000000
Application is running
Start operation achieved successfully

===============================================================================================================================
===============================================================================================================================
===============================================================================================================================
alila.jj@gmail.com
Posts: 6
Joined: Tue Dec 21, 2021 9:29 pm

Re: only 50% of program gets compiled!!!!

Post by alila.jj@gmail.com »

and this is my settings
Attachments
this is my settings
this is my settings
SETTINGS.png (75.21 KiB) Viewed 2381 times
Post Reply

Return to “General discussion”