Brauche hilfe mit Makefile STM32+FreeRTOS

#2742836
Lesenswert?

Hi
ich weiß nicht was ich falsch mache. Habe ein Makefile für den STM32 + 
FreeRTOS und bekomme 'undefined reference' Fehler.
Es muss doch irgendwas ganz banales sein?

Gruß und danke zur späten stunde

1
#/*
2
#    FreeRTOS V7.1.0 - Copyright (C) 2011 Real Time Engineers Ltd.
3
#
4
#    ***************************************************************************
5
#    *                                                                         *
6
#    * If you are:                                                             *
7
#    *                                                                         *
8
#    *    + New to FreeRTOS,                                                   *
9
#    *    + Wanting to learn FreeRTOS or multitasking in general quickly       *
10
#    *    + Looking for basic training,                                        *
11
#    *    + Wanting to improve your FreeRTOS skills and productivity           *
12
#    *                                                                         *
13
#    * then take a look at the FreeRTOS books - available as PDF or paperback  *
14
#    *                                                                         *
15
#    *        "Using the FreeRTOS Real Time Kernel - a Practical Guide"        *
16
#    *                  http://www.FreeRTOS.org/Documentation                  *
17
#    *                                                                         *
18
#    * A pdf reference manual is also available.  Both are usually delivered   *
19
#    * to your inbox within 20 minutes to two hours when purchased between 8am *
20
#    * and 8pm GMT (although please allow up to 24 hours in case of            *
21
#    * exceptional circumstances).  Thank you for your support!                *
22
#    *                                                                         *
23
#    ***************************************************************************
24
#
25
#    This file is part of the FreeRTOS distribution.
26
#
27
#    FreeRTOS is free software; you can redistribute it and/or modify it under
28
#    the terms of the GNU General Public License (version 2) as published by the
29
#    Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
30
#    ***NOTE*** The exception to the GPL is included to allow you to distribute
31
#    a combined work that includes FreeRTOS without being obliged to provide the
32
#    source code for proprietary components outside of the FreeRTOS kernel.
33
#    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
34
#    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
35
#    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
36
#    more details. You should have received a copy of the GNU General Public 
37
#    License and the FreeRTOS license exception along with FreeRTOS; if not it 
38
#    can be viewed here: http://www.freertos.org/a00114.html and also obtained 
39
#    by writing to Richard Barry, contact details for whom are available on the
40
#    FreeRTOS WEB site.
41
#
42
#    1 tab == 4 spaces!
43
#
44
#    http://www.FreeRTOS.org - Documentation, latest information, license and
45
#    contact details.
46
#
47
#    http://www.SafeRTOS.com - A version that is certified for use in safety
48
#    critical systems.
49
#
50
#    http://www.OpenRTOS.com - Commercial support, development, porting,
51
#    licensing and training services.
52
#*/
53

54

55
#/************************************************************************* 
56
# * Please ensure to read http://www.freertos.org/portLM3Sxxxx_Eclipse.html
57
# * which provides information on configuring and running this demo for the
58
# * various Luminary Micro EKs.
59
# *************************************************************************/
60

61
#+---------------------------------------------------------------------------
62
#
63
#  Copyright (c) 2010 Anton Gusev aka AHTOXA (HTTP://AHTOXA.NET)
64
#
65
#  File:       makefile
66
#
67
#  Contents:   makefile to build arm Cortex-M3 software with gcc
68
#
69
#----------------------------------------------------------------------------
70

71
#############  program name
72
  TARGET  = main
73

74
# program version
75
  VER_MAJOR  = 0
76
  VER_MINOR  = 1
77

78
  TOOL  = arm-none-eabi-
79
#  TOOL  = arm-kgp-eabi-
80

81
  OPTIMIZE  = -O2
82
  USE_LTO    = NO
83

84
# compile options 
85
#  MCU      = cortex-m3
86
# Select family 
87
# STM32F10X_LD    : STM32 Low density devices
88
# STM32F10X_LD_VL : STM32 Low density Value Line devices
89
# CHIP    = STM32F10X_MD    #: STM32 Medium density devices
90
# STM32F10X_MD_VL : STM32 Medium density Value Line devices
91
# STM32F10X_HD    : STM32 High density devices
92
# STM32F10X_HD_VL : STM32 XL-density devices
93
# STM32F10X_CL    : STM32 Connectivity line devices
94
# STM32F10X_XL    : STM32 XL-density devices
95
#  CHIP    = STM32F10X_MD
96

97
  MCU   = cortex-m4
98
  CHIP  = STM32F407VG
99

100
#STARTUP = startup_stm32f10x_md.S
101
STARTUP = startup_$(CHIP)
102

103
  RTOS_ROOT=../FreeRTOSV7.1.1
104
  CMSIS_DRIVER_DIR=../STM32F4xx_DSP_StdPeriph_Lib_V1.0.0/Libraries/CMSIS/Include
105

106

107
#defines
108
  DEFS    = -D$(CHIP)
109
  DEFS    += -DVER_MAJOR=$(VER_MAJOR)
110
  DEFS    += -DVER_MINOR=$(VER_MINOR)
111

112
###########################################################
113
#  common part for all my cortex-m3 projects
114
###########################################################
115
  
116
  BASE    = .
117
  CC      = $(TOOL)gcc
118
  CXX      = $(TOOL)g++
119
  LD      = $(TOOL)g++
120
  AS      = $(CC) -x assembler-with-cpp
121
  OBJCOPY    = $(TOOL)objcopy
122
  OBJDUMP    = $(TOOL)objdump
123
  SIZE    = $(TOOL)size -d
124
  FLASHER    = openocd
125
  RM      = rm -f
126
  CP      = cp
127
  MD      = mkdir
128

129

130
#  dirs
131
  SRCDIR    = $(BASE)/src
132
  OBJDIR    = $(BASE)/obj
133
  EXEDIR    = $(BASE)/exe
134
  LSTDIR    = $(BASE)/lst
135
  PRJDIR    = $(BASE)/prj
136
  BAKDIR    = $(BASE)/bak
137

138
#files
139
  HEX    = $(EXEDIR)/$(TARGET).hex
140
  BIN    = $(EXEDIR)/$(TARGET).bin
141
  AXF    = $(EXEDIR)/$(TARGET).axf
142
  ELF    = $(EXEDIR)/$(TARGET).elf
143
  MAP    = $(LSTDIR)/$(TARGET).map
144
  LSS    = $(LSTDIR)/$(TARGET).lss
145
  OK    = $(EXEDIR)/$(TARGET).ok
146

147
# linker script (chip dependent)
148
  LD_SCRIPT  = $(SRCDIR)/$(CHIP).ld
149

150
# scmRTOS dir
151
#  SCMDIR    = ../scmRTOS
152
#  COMMON    = ../SamplesCommon
153
 
154
# source directories (all *.c, *.cpp and *.s files included)
155
  DIRS  := $(SRCDIR)
156
#  DIRS  += $(COMMON)
157
  DIRS  += $(RTOS_ROOT)/Source
158
  DIRS  += $(RTOS_ROOT)/Source/portable/GCC/ARM_CM4F
159
  DIRS  += $(RTOS_ROOT)/Source/include
160
#  DIRS  += ../MyARMLib/STM32/STM32F103_Pinboard_II
161
#  DIRS  += $(RTOS_ROOT)/Demo/Common/Minimal
162
  DIRS  += $(RTOS_ROOT)/Demo/Common/include
163
#  DIRS  += $(RTOS_ROOT)/Demo/Common/ethernet/uIP/uip-1.0/uip   
164
#  DIRS  += $(RTOS_ROOT)/Source/portable/GCC/ARM_CM3_MPU  
165
  
166
  #STM32F1_DISCOVERY_DRIVER_DIR=../MyARMLib/STM32/STM32F4_discovery
167
  DIRS  += $(CMSIS_DRIVER_DIR)
168
  DIRS  += ../STM32F4xx_DSP_StdPeriph_Lib_V1.0.0/Libraries/CMSIS/Include
169
#  DIRS  += ../MyARMLib/STM32/STM32F10x/include
170
#  DIRS  += ../MyARMLib/STM32/STM32F10x_StdPeriph_Driver/inc
171
#  DIRS  += ../MyARMLib/STM32/STM32F10x_StdPeriph_Driver/src
172
  DIRS  += ../STM32F4xx_DSP_StdPeriph_Lib_V1.0.0/Libraries/CMSIS/Device/ST/STM32F4xx/Include
173
#  DIRS  += ../STM32F4xx_DSP_StdPeriph_Lib_V1.0.0/Libraries/STM32/STM32F4_discovery
174
  DIRS   += ../stm32f4-discovery/Utilities/STM32F4-Discovery
175
  DIRS  += ../STM32F4xx_DSP_StdPeriph_Lib_V1.0.0/Libraries/STM32F4xx_StdPeriph_Driver/src
176
  DIRS  += ../STM32F4xx_DSP_StdPeriph_Lib_V1.0.0/Libraries/STM32F4xx_StdPeriph_Driver/inc
177

178

179
#  DIRS  += ../MyARMLib/FreeRTOS
180

181
# includes
182
  INCS  := $(patsubst %, -I "%", $(DIRS))
183

184
# individual source files
185
  SRCS  := 
186

187
#calc obj files list
188
  OBJS  := $(SRCS)
189
  OBJS  += $(wildcard $(addsuffix /*.cpp, $(DIRS)))
190
  OBJS  += $(wildcard $(addsuffix /*.c, $(DIRS)))
191
  OBJS  += $(wildcard $(addsuffix /*.S, $(DIRS)))
192
  
193
  #OBJS  += $(RTOS_ROOT)/Source/tasks.c
194
  #/port.c
195

196
#  OBJS  += ../MyARMLib/STM32/STM32F10x_StdPeriph_Driver/src/stm32f10x_gpio.c 
197
#  OBJS  += ../MyARMLib/STM32/STM32F10x_StdPeriph_Driver/src/stm32f10x_rcc.c 
198
#  OBJS  += $(RTOS_ROOT)/Source/tasks.c
199
#  OBJS  += $(RTOS_ROOT)/Source/list.c 
200
#  OBJS  += $(RTOS_ROOT)/Source/timers.c 
201
#  OBJS  += $(RTOS_ROOT)/Source/queue.c 
202
#  OBJS  += $(RTOS_ROOT)/Source/tasks.c 
203
#  OBJS  += $(RTOS_ROOT)/Source/portable/GCC/ARM_CM3/port.c 
204
#  OBJS  += $(RTOS_ROOT)/Source/portable/MemMang/heap_2.c  
205
  OBJS  := $(notdir $(OBJS))
206
  OBJS  := $(OBJS:.cpp=.o)
207
  OBJS  := $(OBJS:.c=.o)
208
  OBJS  := $(OBJS:.S=.o)
209
  OBJS  := $(patsubst %, $(OBJDIR)/%, $(OBJS))
210

211
#files to archive
212
  ARCFILES  = \
213
    $(SRCDIR) \
214
    $(PRJDIR) \
215
    $(SCMDIR) \
216
    $(BASE)/makefile \
217
    $(BASE)/.cproject \
218
    $(BASE)/.project
219

220
# flags
221
  FLAGS  = -mcpu=$(MCU) -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=softfp
222
  FLAGS  += $(INCS)
223
  FLAGS  += -MD 
224
  #-DGCC_ARMCM3
225
  FLAGS  += $(DEFS) -DUSE_STDPERIPH_DRIVER
226
  FLAGS  += -Wa,-adhlns=$(addprefix $(LSTDIR)/, $(notdir $(addsuffix .lst, $(basename $<))))
227

228
  AFLAGS  = $(FLAGS)
229

230
  CFLAGS  = $(FLAGS)
231
  CFLAGS  += $(OPTIMIZE)
232
  CFLAGS  += -std=gnu99
233
  CFLAGS  += -D GCC_ARMCM3
234
  CFLAGS  += -g
235
  CFLAGS  += -ffunction-sections -fdata-sections
236
#  CFLAGS  += -Wall -Wextra
237
#  CFLAGS  += -Wimplicit -Wcast-align -Wpointer-arith -Wredundant-decls
238
#  CFLAGS  += -Wshadow -Wcast-qual -Wcast-align -Wnested-externs -pedantic
239

240
  CXXFLAGS  = $(FLAGS)
241
  CXXFLAGS  += $(OPTIMIZE)
242
  CXXFLAGS  += -g
243
  CXXFLAGS  += -fno-exceptions -fno-rtti
244
  CXXFLAGS  += -ffunction-sections -fdata-sections
245
  CXXFLAGS  += -fno-threadsafe-statics
246
  CXXFLAGS  += -funsigned-bitfields -fshort-enums
247
  CXXFLAGS  += -Wall -Wextra
248
  CXXFLAGS  += -Winline
249
  CXXFLAGS  += -Wpointer-arith -Wredundant-decls
250
  CXXFLAGS  += -Wshadow -Wcast-qual -Wcast-align -pedantic
251

252
  LD_FLAGS  = -mcpu=$(MCU)
253
  LD_FLAGS  += -mthumb
254
  LD_FLAGS  += -nostartfiles 
255
  LD_FLAGS  += -Wl,-Map="$(MAP)",--cref
256
  LD_FLAGS  += -Wl,--gc-sections
257
  LD_FLAGS  += -T$(LD_SCRIPT)
258

259
ifeq ($(USE_LTO),YES)
260
  CFLAGS    += -flto
261
  CXXFLAGS  += -flto
262
  LD_FLAGS  += -flto $(OPTIMIZE)
263
endif
264

265
#openocd command-line
266

267
# debug level (d0..d3)
268
  oocd_params    = -d3
269
# interface and board/target settings (using the OOCD target-library here)
270
#  oocd_params    += -c "fast enable"
271
  oocd_params    += -f interface/arm-usb-ocd.cfg 
272
  oocd_params    += -f board/stm32f10x_128k_eval.cfg
273
  oocd_params    += -c init -c targets
274
  oocd_params_program  = $(oocd_params)
275
# commands to prepare flash-write
276
  oocd_params_program  += -c "halt"
277
# flash-write and -verify
278
  oocd_params_program  += -c "flash write_image erase $(ELF)"
279
  oocd_params_program  += -c "verify_image $(ELF)"
280
# reset target
281
  oocd_params_program  += -c "reset run"
282
# terminate OOCD after programming
283
  oocd_params_program  += -c shutdown
284

285
  oocd_params_reset  = $(oocd_params)
286
  oocd_params_reset  += -c "reset run"
287
  oocd_params_reset  += -c shutdown
288

289
.SILENT :
290

291
.PHONY: all start dirs build clean program reset archive
292

293
############# targets
294

295
all : start dirs $(AXF) $(ELF) $(HEX) $(BIN) $(LSS) $(OK)
296

297
build: clean all
298

299
start:
300
  @echo --- building $(TARGET) $(OBJS)
301

302
$(LSS): $(ELF) makefile
303
  @echo --- making asm-lst...
304
#  @$(OBJDUMP) -dStC $(ELF) > $(LSS)
305
  @$(OBJDUMP) -dC $(ELF) > $(LSS)
306

307
$(OK): $(ELF)
308
  @$(SIZE) $(ELF)
309
  @echo "Errors: none"
310

311
$(AXF):  $(OBJS) $(STARTUP).o makefile
312
  @echo --- linking... axf
313
  $(LD) $(OBJS) $(STARTUP).o $(LIBS) $(LD_FLAGS) -o "$(AXF)"
314
  
315
$(ELF):  $(OBJS) makefile
316
  @echo --- linking... 
317
  $(LD) $(OBJS) $(LIBS) $(LD_FLAGS) -o "$(ELF)"
318

319
$(HEX): $(ELF)
320
  @echo --- make hex...
321
  @$(OBJCOPY) -O ihex $(ELF) $(HEX)
322

323
$(BIN): $(ELF)
324
  @echo --- make binary...
325
  @$(OBJCOPY) -O binary $(ELF) $(BIN)
326

327
program: $(ELF)
328
  @echo "Programming with OPENOCD"
329
  $(FLASHER) $(oocd_params_program)
330

331
reset:
332
  @echo Resetting device
333
  $(FLASHER) $(oocd_params_reset)
334

335
VPATH := $(DIRS)
336

337
$(OBJDIR)/%.o: %.cpp makefile
338
  @echo --- compiling $<... 
339
  $(CXX) -c $(CXXFLAGS) -o $@ $< 
340

341
$(OBJDIR)/%.o: %.c makefile
342
  @echo --- compiling $<... 
343
  $(CC) -c $(CFLAGS) -o $@ $<
344

345
$(OBJDIR)/%.o: %.S makefile
346
  @echo --- assembling $<...
347
  $(AS) -c $(AFLAGS) -o $@ $<
348

349
$(OBJDIR)/%.o: %.s makefile
350
  @echo --- assembling $<...
351
  $(AS) -c $(AFLAGS) -o $@ $<
352
  
353

354
dirs: $(OBJDIR) $(EXEDIR) $(LSTDIR) $(BAKDIR)
355

356
$(OBJDIR):
357
  -@$(MD) $(OBJDIR)
358

359
$(EXEDIR):
360
  -@$(MD) $(EXEDIR)
361

362
$(LSTDIR):
363
  -@$(MD) $(LSTDIR)
364

365
$(BAKDIR):
366
  -@$(MD) $(BAKDIR)
367

368
clean:
369
  -@$(RM) $(OBJDIR)/*.d 2>/dev/null
370
  -@$(RM) $(OBJDIR)/*.o 2>/dev/null
371
  -@$(RM) $(LSTDIR)/*.lst 2>/dev/null
372
  -@$(RM) $(ELF)
373
  -@$(RM) $(HEX)
374
  -@$(RM) $(LSS)
375
  -@$(RM) $(MAP)
376

377
archive:
378
  @echo --- archiving...
379
  7z a $(BAKDIR)/$(TARGET)_`date +%Y-%m-%d,%H-%M-%S` $(ARCFILES)
380
  @echo --- done!
381

382
# dependencies
383
ifeq (,$(findstring build,$(MAKECMDGOALS)))
384
 ifeq (,$(findstring clean,$(MAKECMDGOALS)))
385
  ifeq (,$(findstring dirs,$(MAKECMDGOALS)))
386
  -include $(wildcard $(OBJDIR)/*.d) 
387
  endif
388
 endif
389
endif



1
--- building main ./obj/hw_config.o ./obj/main.o ./obj/stm32f4xx_it.o ./obj/system_stm32f4xx.o ./obj/tiny_printf.o ./obj/croutine.o ./obj/list.o ./obj/queue.o ./obj/tasks.o ./obj/timers.o ./obj/port.o ./obj/stm32f4_discovery_audio_codec.o ./obj/stm32f4_discovery.o ./obj/stm32f4_discovery_lis302dl.o ./obj/misc.o ./obj/stm32f4xx_adc.o ./obj/stm32f4xx_can.o ./obj/stm32f4xx_crc.o ./obj/stm32f4xx_cryp_aes.o ./obj/stm32f4xx_cryp.o ./obj/stm32f4xx_cryp_des.o ./obj/stm32f4xx_cryp_tdes.o ./obj/stm32f4xx_dac.o ./obj/stm32f4xx_dbgmcu.o ./obj/stm32f4xx_dcmi.o ./obj/stm32f4xx_dma.o ./obj/stm32f4xx_exti.o ./obj/stm32f4xx_flash.o ./obj/stm32f4xx_fsmc.o ./obj/stm32f4xx_gpio.o ./obj/stm32f4xx_hash.o ./obj/stm32f4xx_hash_md5.o ./obj/stm32f4xx_hash_sha1.o ./obj/stm32f4xx_i2c.o ./obj/stm32f4xx_iwdg.o ./obj/stm32f4xx_pwr.o ./obj/stm32f4xx_rcc.o ./obj/stm32f4xx_rng.o ./obj/stm32f4xx_rtc.o ./obj/stm32f4xx_sdio.o ./obj/stm32f4xx_spi.o ./obj/stm32f4xx_syscfg.o ./obj/stm32f4xx_tim.o ./obj/stm32f4xx_usart.o ./obj/stm32f4xx_wwdg.o
2
--- compiling ./src/hw_config.c...
3
--- compiling ./src/main.c...
4
--- compiling ./src/stm32f4xx_it.c...
5
--- compiling ./src/system_stm32f4xx.c...
6
--- compiling ./src/tiny_printf.c...
7
--- compiling ../FreeRTOSV7.1.1/Source/croutine.c...
8
--- compiling ../FreeRTOSV7.1.1/Source/list.c...
9
--- compiling ../FreeRTOSV7.1.1/Source/queue.c...
10
--- compiling ../FreeRTOSV7.1.1/Source/tasks.c...
11
--- compiling ../FreeRTOSV7.1.1/Source/timers.c...
12
--- compiling ../FreeRTOSV7.1.1/Source/portable/GCC/ARM_CM4F/port.c...
13
--- compiling ../stm32f4-discovery/Utilities/STM32F4-Discovery/stm32f4_discovery_audio_codec.c...
14
--- compiling ../stm32f4-discovery/Utilities/STM32F4-Discovery/stm32f4_discovery.c...
15
--- compiling ../stm32f4-discovery/Utilities/STM32F4-Discovery/stm32f4_discovery_lis302dl.c...
16
--- compiling ../STM32F4xx_DSP_StdPeriph_Lib_V1.0.0/Libraries/STM32F4xx_StdPeriph_Driver/src/misc.c...
17
--- compiling ../STM32F4xx_DSP_StdPeriph_Lib_V1.0.0/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_adc.c...
18
--- compiling ../STM32F4xx_DSP_StdPeriph_Lib_V1.0.0/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_can.c...
19
--- compiling ../STM32F4xx_DSP_StdPeriph_Lib_V1.0.0/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_crc.c...
20
--- compiling ../STM32F4xx_DSP_StdPeriph_Lib_V1.0.0/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_cryp_aes.c...
21
--- compiling ../STM32F4xx_DSP_StdPeriph_Lib_V1.0.0/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_cryp.c...
22
--- compiling ../STM32F4xx_DSP_StdPeriph_Lib_V1.0.0/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_cryp_des.c...
23
--- compiling ../STM32F4xx_DSP_StdPeriph_Lib_V1.0.0/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_cryp_tdes.c...
24
--- compiling ../STM32F4xx_DSP_StdPeriph_Lib_V1.0.0/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_dac.c...
25
--- compiling ../STM32F4xx_DSP_StdPeriph_Lib_V1.0.0/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_dbgmcu.c...
26
--- compiling ../STM32F4xx_DSP_StdPeriph_Lib_V1.0.0/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_dcmi.c...
27
--- compiling ../STM32F4xx_DSP_StdPeriph_Lib_V1.0.0/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_dma.c...
28
--- compiling ../STM32F4xx_DSP_StdPeriph_Lib_V1.0.0/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_exti.c...
29
--- compiling ../STM32F4xx_DSP_StdPeriph_Lib_V1.0.0/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_flash.c...
30
--- compiling ../STM32F4xx_DSP_StdPeriph_Lib_V1.0.0/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_fsmc.c...
31
--- compiling ../STM32F4xx_DSP_StdPeriph_Lib_V1.0.0/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_gpio.c...
32
--- compiling ../STM32F4xx_DSP_StdPeriph_Lib_V1.0.0/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_hash.c...
33
--- compiling ../STM32F4xx_DSP_StdPeriph_Lib_V1.0.0/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_hash_md5.c...
34
--- compiling ../STM32F4xx_DSP_StdPeriph_Lib_V1.0.0/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_hash_sha1.c...
35
--- compiling ../STM32F4xx_DSP_StdPeriph_Lib_V1.0.0/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_i2c.c...
36
--- compiling ../STM32F4xx_DSP_StdPeriph_Lib_V1.0.0/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_iwdg.c...
37
--- compiling ../STM32F4xx_DSP_StdPeriph_Lib_V1.0.0/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_pwr.c...
38
--- compiling ../STM32F4xx_DSP_StdPeriph_Lib_V1.0.0/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_rcc.c...
39
--- compiling ../STM32F4xx_DSP_StdPeriph_Lib_V1.0.0/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_rng.c...
40
--- compiling ../STM32F4xx_DSP_StdPeriph_Lib_V1.0.0/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_rtc.c...
41
--- compiling ../STM32F4xx_DSP_StdPeriph_Lib_V1.0.0/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_sdio.c...
42
--- compiling ../STM32F4xx_DSP_StdPeriph_Lib_V1.0.0/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_spi.c...
43
--- compiling ../STM32F4xx_DSP_StdPeriph_Lib_V1.0.0/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_syscfg.c...
44
--- compiling ../STM32F4xx_DSP_StdPeriph_Lib_V1.0.0/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_tim.c...
45
--- compiling ../STM32F4xx_DSP_StdPeriph_Lib_V1.0.0/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_usart.c...
46
--- compiling ../STM32F4xx_DSP_StdPeriph_Lib_V1.0.0/Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_wwdg.c...
47
--- linking... axf
48
./obj/main.o: In function `vApplicationIdleHook':
49
/home/christoph/STM32/stm32f4-discovery-freertos/./src/main.c:240: undefined reference to `xPortGetFreeHeapSize'
50
./obj/queue.o: In function `xQueueGenericCreate':
51
/home/christoph/STM32/stm32f4-discovery-freertos/../FreeRTOSV7.1.1/Source/queue.c:331: undefined reference to `pvPortMalloc'
52
/home/christoph/STM32/stm32f4-discovery-freertos/../FreeRTOSV7.1.1/Source/queue.c:338: undefined reference to `pvPortMalloc'
53
/home/christoph/STM32/stm32f4-discovery-freertos/../FreeRTOSV7.1.1/Source/queue.c:358: undefined reference to `vPortFree'
54
./obj/tasks.o: In function `prvAllocateTCBAndStack':
55
/home/christoph/STM32/stm32f4-discovery-freertos/../FreeRTOSV7.1.1/Source/tasks.c:2136: undefined reference to `pvPortMalloc'
56
/home/christoph/STM32/stm32f4-discovery-freertos/../FreeRTOSV7.1.1/Source/tasks.c:2143: undefined reference to `pvPortMalloc'
57
/home/christoph/STM32/stm32f4-discovery-freertos/../FreeRTOSV7.1.1/Source/tasks.c:2148: undefined reference to `vPortFree'
58
./obj/tasks.o: In function `prvDeleteTCB':
59
/home/christoph/STM32/stm32f4-discovery-freertos/../FreeRTOSV7.1.1/Source/tasks.c:2324: undefined reference to `vPortFree'
60
/home/christoph/STM32/stm32f4-discovery-freertos/../FreeRTOSV7.1.1/Source/tasks.c:2325: undefined reference to `vPortFree'
61
./obj/timers.o: In function `prvProcessReceivedCommands':
62
/home/christoph/STM32/stm32f4-discovery-freertos/../FreeRTOSV7.1.1/Source/timers.c:568: undefined reference to `vPortFree'
63
./obj/stm32f4_discovery_audio_codec.o: In function `Audio_MAL_IRQHandler':
64
/home/christoph/STM32/stm32f4-discovery-freertos/../stm32f4-discovery/Utilities/STM32F4-Discovery/stm32f4_discovery_audio_codec.c:511: undefined reference to `EVAL_AUDIO_TransferComplete_CallBack'
65
./obj/stm32f4_discovery_audio_codec.o: In function `SPI3_IRQHandler':
66
/home/christoph/STM32/stm32f4-discovery-freertos/../stm32f4-discovery/Utilities/STM32F4-Discovery/stm32f4_discovery_audio_codec.c:593: undefined reference to `EVAL_AUDIO_GetSampleCallBack'
67
/home/christoph/STM32/stm32f4-discovery-freertos/../stm32f4-discovery/Utilities/STM32F4-Discovery/stm32f4_discovery_audio_codec.c:589: undefined reference to `EVAL_AUDIO_GetSampleCallBack'
68
collect2: ld returned 1 exit status
69
make: *** [exe/main.axf] Error 1
#2742870
Lesenswert?

Danke, das hat schonmal geholfen.

Was soll ich denn aber nun davon halten? Es schein als wäre die binary 
leer ? (Dateigrößer der main.bin ist auch 0 )
1
--- linking...
2
/home/christoph/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/bin/../lib/gcc/arm-none-eabi/4.6.3/../../../../arm-none-eabi/bin/ld: warning: cannot find entry symbol Reset_Handler; defaulting to 08000000
3
--- make hex...
4
--- make binary...
5
--- making asm-lst...
6
   text     data      bss      dec      hex  filename
7
      0        0     1024     1024      400  ./exe/main.elf
8
Errors: none
#2742872
Lesenswert?

Dir fehlt ein Startup-File, welches .data und .bss initialisiert und 
dann zu main springt. Darin existiert ein Einsprungpunkt, welcher 
Reset_Handler heißt. Häufig sind solche Files in Assembler geschrieben. 
Du wirst darin noch ein paar Interrupt-Handler (beim STM32F103 waren das 
3 oder 4) für FreeRTOS anpassen müssen.

Gruß Oliver

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