This is where I'm at. I have been following the instructions in this link http://zone.ni.com/devzone/cda/tut/p/id/7152 . I have managed to get to the stage of modifying the TargetConfig.ini with the the files obtained from ST Microelectronics. Basically I have completed message 25 from Joshua of this forum.
At this stage I can select my STM32F103 processor from within in LV and build a simple project, however I get build fail with errors. As below, there are a lot more similar but have only included the first.
C:\Program Files (x86)\National Instruments\LabVIEW 8.6\Targets\Keil\Embedded\RealView\Generic\STM32F103\Include\stm32f10x.h(80): error: #35: #error directive: "Please select first the target STM32F10x device used in your application (in stm32f10x.h file)"
I'm not sure where to go from here, do I need to continue with the RTX_Config.c & Retarget.c files? It's just I can't seam to get my head around this part & don't really know where to obtain these files..
Could someone point me in the right direction? Or does someone have a target folder with this STM32F103 files.
My setup is
Not using micro SDK
Not quite a zombie forum thread yet...:)
Starting at line 47 of the stm32f10x.h file there are a couple of entries with the note, "Uncomment the line below according to the target STM32 device used in your application" Did you uncomment any of these lines or did you leave the default in there? Can you post your TargetConfig.ini file?
Please note that my responses may be slow during this week because of the holidays.
Thank you for your reply, I had not uncomment the the line in stm32f10x.h, it was left at default. I'm assuming I have to uncomment one of the options so I will give it a try and see what happens.
What about the RTX_config.c and retarget.c?
I have attached my TargetConfig.ini for your inspection.
Thank you very much and most appreciated.
I have an update. I released that I missed some important files out so I have attached an amended TargetConfig.ini. I am reducing the errors but currently stuck with this one:-
Build target 'LabVIEW'
C:\Program Files (x86)\National Instruments\LabVIEW 8.6\Targets\Keil\Embedded\RealView\Generic\STM32F103\Libraries\CoreSupport\core_cm3.h(1502): error: #20: identifier "IRQn_Type" is undefined
C:\Program Files (x86)\National Instruments\LabVIEW 8.6\Targets\Keil\Embedded\RealView\Generic\STM32F103\Libraries\CoreSupport\core_cm3.h(1515): error: #20: identifier "IRQn_Type" is undefined.
Again there are a lot of them but all similar referring to core_cm3.h.
I am not sure what is going on at the moment, but does the core_cm3.h file have a definition for IRQn_Type function? I don't really have a good troubleshooting step for you at the moment. The core_cm3 should have that already defined: http://www.keil.com/support/man/docs/gsac/gsac_nvic.htm
Thanks for the reply, I think I may have resolved the issue with the compiling error, however during the linking process I have the following errors:-
.\Obj\LabVIEW.axf: Error: L6218E: Undefined symbol ARM_rtc_gettime (referred from ccgtimesupport_rtx.o).
.\Obj\LabVIEW.axf: Error: L6218E: Undefined symbol ARM_Serial_AvailChar (referred from platformserial_rtx.o).
.\Obj\LabVIEW.axf: Error: L6218E: Undefined symbol ARM_Serial_ClosePort (referred from platformserial_rtx.o).
.\Obj\LabVIEW.axf: Error: L6218E: Undefined symbol ARM_Serial_InitPort (referred from platformserial_rtx.o).
.\Obj\LabVIEW.axf: Error: L6218E: Undefined symbol ARM_Serial_OpenPort (referred from platformserial_rtx.o).
.\Obj\LabVIEW.axf: Error: L6218E: Undefined symbol ARM_Serial_Read (referred from platformserial_rtx.o).
.\Obj\LabVIEW.axf: Error: L6218E: Undefined symbol ARM_Serial_Write (referred from platformserial_rtx.o).
.\Obj\LabVIEW.axf: Error: L6218E: Undefined symbol ARM_init_rtc (referred from armclib_rtx.o).
.\Obj\LabVIEW.axf: Error: L6218E: Undefined symbol ARM_TargetInit (referred from lvinit_rtx.o).
.\Obj\LabVIEW.axf: Error: L6218E: Undefined symbol ARM_TargetUnInit (referred from lvinit_rtx.o).
Target not created
I have been trying to resolve this issue but am at a loss as to whats causing it, I think i'm missing something, have you any pointers?
I have also attached my new targetConfig.ini file
Looks like we have a port for the STM chip already. I have attached the UVision project. I would put this in your Generic folder and give it a shot. Let me know if you run into any trouble! It looks like the errors you are getting are because the ARM_RTClock.c and ARM_Serial.c are not in your project. In the project I have attach they should already be included and help you get passed those build errors.
Thank you for your help, the new porting files worked a treat, however I had to find the tim1 h & c files from the net as my Keil did not have them.
However I have noticed once the compiler has finished the uvision has the STM32F103ZET6 chip selected, which is the high density chip.
I have the medium density chip "STM32F103RBT6". If I select this chip under devices it reports the programming was successful to the target, if I rebuild the project again I get the following error:-
.\Obj\LabVIEW.axf: Error: L6406W: No space in execution regions with .ANY selector matching Section HEAP(stm32f10x.o).
.\Obj\LabVIEW.axf: Error: L6407W: Sections of aggregate size 0x8000 bytes could not fit into .ANY selector(s).
Target not created
I have to reselect the STM32F103ZE (not the ZET6 as I can't find the original) under devices and re build for every thing to be OK, then reselect the RB version to program.. I'm I doing the correct thing here or is there a better way?
Also I only have the STM-H103 header board, it has one led connected to PC12 (pin53). What will I have to do to select this under the Elemental IO as PC12 is not listed, I have read chapter 3 but as a little confused, any advise would be welcome
My thoughts are at least do something with this LED to prove that the programming of the device is working..
Thanks again for your help.