Mehrere Codefiles bei SDCC und Code:Blocks

Gast #5194201
Lesenswert?

Hallo zusammen,

ich habe mir eine Entwicklungsumgebungfür STM8 mit Code:Blocks und SDCC 
gemäss der Anleitung unter:
https://web.archive.org/web/20160420063536/http://blog.podstuff.de/de/codeblocks-fuer-stm8s-discovery-einrichten/

eingerichtet.

Als "DevBoard" kommt ein Chinaboard mit STM8S103F Board zum Einsatz.

Ein erstes "Blinkprogramm" konnte ich erfolgreich compilieren und 
flashen. Die LED blinkt wie es sein soll.

Soweit so gut, jetzt zum Problem.

Ich habe den Code des  Blinkprogramms aufgeräumt und auf mehrer .c und 
.h Dateien verteilt. DIe .h Dateien sind per include eingebunden und 
auch die .c Dateien bei "Build target files" angehakt.
Nun lässt sich das Projekt zwar noch compilieren und flashen, das 
Programm führt aber keine Funktionen aus, die in ausgelagerten Dateien 
liegen.
Woran kann das liegen? Ich werd fast verrückt.
Danke für Eure Unterstützung.

Grüsse
Gast #5194509
Lesenswert?

Hallo hochsitzcola,

danke für Deine Antwort. Ein Makefile hab ich nicht gefunden.
Die Ausgabe im Info Fenster sieht für mich zunächst aber gut aus.
1
-------------- Build: prod in firstProject (compiler: Small Device C Compiler)---------------
2

3
sdcc.exe --out-fmt-ihx -mstm8 -DSTM8S103  -DSTM8S103  --out-fmt-ihx   -I"..\STM8 static Lib\inc" -I"C:\Program Files (x86)\sdcc\include" -c firstProject.c -o .\firstProject.rel
4
sdcc.exe --out-fmt-ihx -mstm8 -DSTM8S103  -DSTM8S103  --out-fmt-ihx   -I"..\STM8 static Lib\inc" -I"C:\Program Files (x86)\sdcc\include" -c timer.c -o .\timer.rel
5
sdcc.exe --out-fmt-ihx -mstm8 -DSTM8S103  -DSTM8S103  --out-fmt-ihx   -I"..\STM8 static Lib\inc" -I"C:\Program Files (x86)\sdcc\include" -c uart.c -o .\uart.rel
6
sdcc.exe -L"..\STM8 static Lib\inc" -L"..\STM8 static Lib\inc" -L"C:\Program Files (x86)\sdcc\lib" -o firstProject.hex --out-fmt-ihx -mstm8 -DSTM8S103  -DSTM8S103  --out-fmt-ihx    "..\STM8 static Lib\lib\STM8S_Lib.lib" "C:\Program Files\SDCC\lib\stm8\stm8.lib" .\firstProject.rel .\timer.rel .\uart.rel
7
Output file is firstProject.hex with size 7.81 KB
8
Running target post-build steps

Danke für Deine Unterstützung-
Gruss
Gast #5194597
Lesenswert?

Also der Linker-Befehl sieht bei mir deutlich anders aus:

sdcc -IStdPeriphLib/inc -I.  -mstm8 -Ddouble=float --std-c99 --nolospre 
--out-fmt-ihx --debug  main.c StdPeriphLib/src/stm8s_itc.rel 
StdPeriphLib/src/stm8s_clk.rel StdPeriphLib/src/stm8s_gpio.rel 
StdPeriphLib/src/stm8s_exti.rel StdPeriphLib/src/stm8s_uart2.rel 
StdPeriphLib/src/stm8s_tim1.rel StdPeriphLib/src/stm8s_tim2.rel 
StdPeriphLib/src/stm8s_adc1.rel gpio.rel utils.rel uart.rel adc.rel 
brake.rel timers.rel pwm.rel motor_controller_high_level.rel 
motor_controller_low_level.rel throttle_pas_torque_sensor_controller.rel 
communications_controller.rel

Nach anfänglichem rumprobieren u.a. mit code:blocks bin ich jetzt bei 
Eclipse und externem Batchfile zum Compilieren und Flashen gelandet, 
siehe den Nachbarthread zum Programmieren des STM8 gelandet.

Gruß
hochsitzcola

Antwort schreiben

Bitte melde dich an, um einen Beitrag zu schreiben.

oder

Mit Google-Account einloggen

Die Registrierung ist kostenlos und dauert nur eine Minute.

Jetzt registrieren