AnsweredAssumed Answered

PIL mode with STM32 Embedded Target, IAR, and J-LINK

Question asked by daryln on Jan 13, 2014
Latest reply on Jan 28, 2014 by daryln
Hi

I've recently been playing the with STM32 Discovery using IAR and J-LINK and Simulink.  I've managed to set everything up okay, and can deploy some of the test Simulink models that ship with the STM32 Embedded Target software (e.g. blinking LED).  This all works fine.

When I try to run the IIR filter PIL model, however, I run into a problem.  After setting the "reference" model up with my toolchain and selecting PIL mode, I attempt to run the top level model.  It get's through code generation okay, but errors out when running the generated makefile for the model reference PIL block. I've attached the output (modified to shorten paths) below:


### IIR_Filter_int32.mk which is generated from <STMPATH>\rtw\stm32F4xx.tmf is up to date

### Building IIR_Filter_int32: .\IIR_Filter_int32.bat

 <STMPATH>\STM32F4xxdemos\CodeGeneration\slprj\stm32F4xx\IIR_Filter_int32>set MATLAB=C:\MATLAB\R2013b 

<STMPATH>\STM32F4xxdemos\CodeGeneration\slprj\stm32F4xx\IIR_Filter_int32>"C:\MATLAB\R2013b\bin\win64\gmake" -f IIR_Filter_int32.mk  GENERATE_ASAP2=0 STM32TARGET="STM32F4xxx" TOOLPATHFROMREGISTRY=1 DONGLE="J-Link" COMPILERSETTINGS="--cpu Cortex-M4 --debug -D ARM_MATH_CM4 -D STM32F4XX -D USE_STDPERIPH_DRIVER --endian=little" LINKERSETTINGS="--map $(MODEL)_IAR_$(BOOT_MODE).map --config $(LDDIR)\$(STM32TARGET)_$(BOOT_MODE).icf --search .. --search $(TOOLPATH)\..\lib" ASSEMBLERSETTINGS="-s+ -w+ -r --cpu cortex-M3 --fpu None --endian little" DOWNLOADAPPLICATION=0 SIMULATION_MODE_RP="PIL" TARGET_SRCS="system_stm32f4xx.c stm32f4xx_gpio.c stm32f4xx_rcc.c stm32f4xx_flash.c stm32f4xx_pwr.c " SYSTEM_SRCS="stm32f4xx_it.c " STARTUP_SRCS="startup_stm32f4xx.s" 

###Makefile for IAR

###BuildMode : model_reference MODELREF_TARGET_TYPE=RTW SIMULATION_MODE_RP=PIL MAKEFILEBUILDER_TGT=0 STANDALONE_SUPPRESS_EXE=0

###Startup file: startup_stm32f4xx.o 

###Startup path: "C:\MATLAB\SUPPOR~1\STMICR~1\STM32F~1\STM32F~1"\lib\CMSIS\Device\ST\STM32F4xx\Source\Templates\iar 

gmake: *** No rule to make target `startup_stm32f4xx.o', needed by `IIR_Filter_int32_rtwlib.lib'.  Stop.

### Real-Time Workshop build procedure for method: 'error

### Real-Time Workshop build procedure for model: 'IIR_Filter_int32' aborted due to an error.


Any pointers would be appreciated.



Outcomes