Hi,
I am using NUCLEOL152RE board.I loaded X-NUCLEO-IKS01A1 example datalog project. I'm still fairly new to Keil so this may be a very silly question but when trying to compile a project, I get the following error:
project.sct(7): error: L6235E: More than one section matches selector - cannot all be FIRST/LAST.
And i removed the scatter file.Now this error is replaced by the error .\STM32L152RE_NUCLEO\Project.axf: Error: L6200E: Symbol SysTick_Handler multiply defined (by hal_cm3.o and stm32l1xx_it.o).
If i commented all those functions in stm32l1xx_it.c i will get the following error
.\STM32L152RE_NUCLEO\Project.axf: error: L6050U: The code size of this image (42830 bytes) exceeds the maximum allowed for this version of the linker.
Please help me to solve this errors.I would greatly appreciate if someone could help.
Regards Krishnapriya.
Surely, that message is entirely clear & self explanatory?
www2.keil.com/.../
http://www.keil.com/demo/limits.asp
The reason you didn't see it initially was because the errors prevented creating the executable image - so there was no way to determine its size!
Hi, Thanks for your valuable time.If i download mdk516.exe it will solve or not?I think my code is around 42Kb.
How do you think that would help?
Did you read the links I provided?
Hi Krishnapriya,
the demo/evaluation-Version of Keil is code size restricted to 32 kB. You Need to have a license to link programs bigger than 32 kB. Maybe try to vary the Compiler-optimization in the "Options for Target/C/C++"-tab. That might reduce the generated code-size. When this doesn't help you may be able to remove some modules you don't Need in order to decrease the code-size of your program. Version 5.16 of Keil is also code-size-restricted, so installing that will not help.
Greetings, Niclas
http://www.keil.com/support/docs/3755.htm
Hi Niclas, Thanks for your suggestion.I imported x-nucleo-iks01a1 example datalog project. I deleted object files but code size is not reduced. And all files are related ones so couldn't delete unwanted module files
Regards Krishnapriya
I guess you have a problem then. Have a try with the compiler-optimization. If that doesn't work you can still try to get a 30-day evaluation license by asking Keil's customer support. However, obviously that's not a permanent solution.
Regards, Niclas
Hi Andrew Neil,
Thank you,I compiled my code like as u suggested.But code size is not reducing.How can i solve this problem.please help me.
There are instructions and hex and binary files that can be loaded into the board
In these folders, compiled images of the firmware are provided, in order to allow the user to test the application in a quick and easy way.
- Install ST-LINK drivers: www.st.com/.../PF251168 - On the Nucleo board put JP5 jumper in U5V position
The binaries are provided in both .bin and .hex format and can be flashed into the micro-controller flash memory using one of the procedures described below.
- Procedure 1 (.bin only) -
1 - Plug the Nucleo Board to the host PC using a mini USB cable. If the ST-LINK driver is correctly installed, it will be recognized as an external memory device called "NUCLEO" 2 - Drag and drop or copy the binary file into the "NUCLEO" device you see in Computer 3 - Wait until flashing is complete.
- Procedure 2 (.hex and .bin) -
1 - Install ST-LINK Utility: www.st.com/.../PF251168. 2 - Plug the Nucleo Board to the host PC using a micro USB cable. 3 - Open the ST-LINK utility. 4 - Set the "Connect Under Reset" Mode selecting "Target -> Settings" from the menu. 5 - Connect to the board selecting "Target -> Connect" from the menu or pressing the corresponding button. 6 - Open the binary file selecting "File -> Open File..." and choose the one you want to flash. 7 - From the menu choose: "Target -> Program" 8 - Check the Start address, it must be equal to 0x08000000. 9 - Check the box "Reset after programming" 10 - Click Start. 11 - Wait until flashing is complete.
Also, If you bought the supported STM32L0 board you should be able to get the Keil license that runs LO projects without a limitation on the size of projects. I have not tried that though.
in the St cube files, stm32l1xx_it.c contains all the interrupt handlers.
the Keil rtos needs to define it's own systick handler.
Comet out the handler in the stm32l1xx_it.c file to resolve the conflict
See also, "ARMLINK: Error: L6200E: Symbol SysTick_Handler multiply defined"
http://www.keil.com/support/docs/3724.htm
FYI, I just tried exporting & building the complete NUCLEO L152RE mbed SDK, and it is also too big for the Lite version - at 36540.
The Project as downloaded has optimisation set to -O0 (ie, none).
www.keil.com/.../armcc_pge1396883051548.htm
Changing to -O1 reduces the size sufficiently to build successfully with the Lite version:
Program Size: Code=30732 RO-data=824 RW-data=60 ZI-data=1352
I want to do this BTW: int x[4]; x = {1,2,3,4};