Prox / RFID
Ladder Logic
[interfacing] †
Tube Joints
Key Code From Photo
SolveSpace (3d CAD)
SketchFlat (2d CAD)
Resume / Consulting
Contact Me

LDmicro Forum - Build C Solution for ARM-GCC

(you are viewing a thread; or go back to list of threads)

Build C Solution for ARM-GCC (by OnosTech)
Hi Jose,

I encountered some issues in "Compile ARM-GCC for 32-bit ARM" with the STM32F10 blue pill. When I Build C Solution below are the warnings and errors I got.

The version of LDmicro is Build

C:\Users\User\Desktop\ARM\xxxxx\ARMGCC\lib>arm-none-eabi-gcc.exe -O0 -mcpu=cortex-m3 -mthumb -g -IInc -I"C:\Program Files (x86)\EmIDE\emIDE V2.20\arm\arm\arm-none-eabi\include" -c Lib_i2clcd.c -o ..\obj\Lib_i2clcd.c.o
Lib_i2clcd.c:33:6: warning: conflicting types for 'LCD_I2C_Send' [enabled by default]
Lib_i2clcd.c:23:5: note: previous implicit declaration of 'LCD_I2C_Send' was here
Lib_i2clcd.c:57:6: warning: conflicting types for 'LCD_I2C_Send4msb' [enabled by default]
Lib_i2clcd.c:38:5: note: previous implicit declaration of 'LCD_I2C_Send4msb' was here

C:\Users\User\Desktop\ARM\xxxxx\ARMGCC\lib>arm-none-eabi-gcc.exe -O0 -mcpu=cortex-m3 -mthumb -g -IInc -I"C:\Program Files (x86)\EmIDE\emIDE V2.20\arm\arm\arm-none-eabi\include" -c romlib.c -o ..\obj\romlib.c.o
romlib.c: In function 'EEPROM_write':
romlib.c:4:6: warning: #warning EEPROM not supported by this target, but you can provide an implementation of write EEPROM data for an external EEPROM chip! [-Wcpp]
romlib.c: In function 'EEPROM_read':
romlib.c:9:6: warning: #warning EEPROM not supported by this target, but you can provide an implementation of reading EEPROM data for an external EPPROM chip! [-Wcpp]

C:\Users\User\Desktop\ARM\xxxxx>arm-none-eabi-gcc.exe -O0 -mcpu=cortex-m3 -mthumb -g -IInc -I"C:\Program Files (x86)\EmIDE\emIDE V2.20\arm\arm\arm-none-eabi\include" -IARMGCC\lib\ -c "test.c" -o "ARMGCC\obj\test.o"
In file included from test.c:10:0:
ladder.h:50:3: error: unknown type name 'uint8_t'
ladder.h:51:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'typedef'
ladder.h:51:3: error: unknown type name 'int8_t'
ladder.h:55:20: fatal error: UsrLib.h: No such file or directory
compilation terminated.
Link object files

C:\Users\User\Desktop\ARM\xxxxx>arm-none-eabi-gcc.exe -o "ARMGCC\bin\test.elf" ARMGCC\obj\*.o -Wl,-Map -Wl,"ARMGCC\bin\test.elf.map" -Wl,--gc-sections -n -Wl,-cref -mcpu=cortex-m3 -mthumb -TARMGCC\lib\CortexM3.ln
ARMGCC\obj\cortexM3.o: In function `Reset_Handler':
C:\Users\User\Desktop\ARM\xxxxx/ARMGCC\lib/CortexM3.S:279: undefined reference to `main'
collect2.exe: error: ld returned 1 exit status
Convert Elf to Hex

Please check and let me know what I am doing wrong.

Best Regards
Tue Mar 23 2021, 05:08:59
(no subject) (by Josť)

I haven't tested yet version ; I'll do do it quickly with my Bluepill to answer your questions.

Tue Mar 23 2021, 16:23:24
(no subject) (by OnosTech)
Thanks, Jose, I am looking forward to your answer.
Wed Mar 24 2021, 04:03:30
(no subject) (by Josť)
I have had a look at the pb and I got the same errors as yours.

New generated ladder.h file causes compiling errors for ARM targets.

There's a bug in this new release because some changes have been made by someone without testing...
Thu Mar 25 2021, 17:13:17
(no subject) (by OnosTech)
Many thanks. I hope this gets resolved soon. I will also check Hi-Tech C or CCS for PIC microcontroller.
Fri Mar 26 2021, 07:23:46
(no subject) (by Josť)
Waiting for the pb to be solved, you can use if you wan't my fork version named ldmicro32 available on Github:


I personaly maintain source code and in case of pb I can do some corrections quickly.
You'll have the same functionalities for ARM bluepill target.

Fri Mar 26 2021, 08:17:11
(no subject) (by OnosTech)
Thanks, Josť, I will check it out.
Sat Mar 27 2021, 07:56:15
Post a reply to this comment:
Your Name:
Your Email:
(no HTML tags; use plain text, and hit Enter for a line break)
Attached file (if you want, 5 MB max):