mikroC ARM V3.0 and ST Standard Peripherals Library
- marina.petrovic
- Posts: 2986
- Joined: 18 Apr 2013 08:11
Re: mikroC ARM V3.0 and ST Standard Peripherals Library
Hi,
Please, try the "STM Test" example from attachment.
The example is adjust to work with the Standard Peripheral Library version 1.1.0.
Best regards,
Marina
Please, try the "STM Test" example from attachment.
The example is adjust to work with the Standard Peripheral Library version 1.1.0.
Best regards,
Marina
- Attachments
-
- STM Test.zip
- (743.67 KiB) Downloaded 323 times
-
- Posts: 20
- Joined: 01 Oct 2012 15:34
Re: mikroC ARM V3.0 and ST Standard Peripherals Library
Hi,
I followed the procedures of example test (STM Test.zip) and I tried to do the same thing with a new project on STM32L152 (Discovery board).
1) replaced the stdint.h file
2) set data type other (int 4 byte)
3) added into project, through project manager, desired STM peripheral library sources and header files
4) modified core_cm3.h and core_cmInstr.h files
Note: the main.c file is empty (I try to build only the library files)
ST library version
******************************************************************************
* @file misc.h
* @author MCD Application Team
* @version V1.1.1
* @date 05-March-2012
******************************************************************************
I can't attach the .zip file of the project because it's more than 256Kb (about 880 Kb)...
Unfortunately, many errors appear:
0 122 Compilation Started Test_STM32L_mio_01.c
3 123 Compiled Successfully Test_STM32L_mio_01.c
0 122 Compilation Started stm32l1xx.h
597 1503 Result is not defined in function: '__REV' core_cminstr.h
122 324 Undeclared identifier 'assert_param' in expression misc.c
122 317 Operator '' is not applicable to these operands '' misc.c
122 402 ; expected, but ')' found misc.c
122 424 '}' expected ';' found misc.c
142 324 Undeclared identifier 'assert_param' in expression misc.c
142 317 Operator '' is not applicable to these operands '' misc.c
142 402 ; expected, but ')' found misc.c
142 424 '}' expected ';' found misc.c
139 1163 Variable 'tmppriority' has been declared, but not used misc.c
139 1163 Variable 'tmppre' has been declared, but not used misc.c
139 1163 Variable 'tmpsub' has been declared, but not used misc.c
163 371 Specifier needed misc.c
163 396 Invalid declarator expected'(' or identifier misc.c
166 371 Specifier needed misc.c
166 300 Syntax Error: ')' expected, but '*' found misc.c
166 371 Specifier needed misc.c
166 300 Syntax Error: ')' expected, but '0xE000E000UL' found misc.c
166 402 ; expected, but '+' found misc.c
166 312 Internal error '' misc.c
0 122 Compilation Started stm32l1xx.h
597 1503 Result is not defined in function: '__REV' core_cminstr.h
193 324 Undeclared identifier 'assert_param' in expression stm32l1xx_adc.c
193 317 Operator '' is not applicable to these operands '' stm32l1xx_adc.c
193 317 Operator '' is not applicable to these operands '' stm32l1xx_adc.c
193 402 ; expected, but ')' found stm32l1xx_adc.c
193 424 '}' expected ';' found stm32l1xx_adc.c
202 371 Specifier needed stm32l1xx_adc.c
202 396 Invalid declarator expected'(' or identifier stm32l1xx_adc.c
223 324 Undeclared identifier 'assert_param' in expression stm32l1xx_adc.c
223 317 Operator '' is not applicable to these operands '' stm32l1xx_adc.c
223 317 Operator '' is not applicable to these operands '' stm32l1xx_adc.c
223 402 ; expected, but ')' found stm32l1xx_adc.c
223 424 '}' expected ';' found stm32l1xx_adc.c
219 1163 Variable 'tmpreg1' has been declared, but not used stm32l1xx_adc.c
220 1163 Variable 'tmpreg2' has been declared, but not used stm32l1xx_adc.c
270 1503 Result is not defined in function: '' stm32l1xx_adc.c
270 312 Internal error '' stm32l1xx_adc.c
1 122 Compilation Started stm32l1xx_adc.c
597 1503 Result is not defined in function: '__REV' core_cminstr.h
140 324 Undeclared identifier 'assert_param' in expression stm32l1xx_aes.c
140 317 Operator '' is not applicable to these operands '' stm32l1xx_aes.c
140 402 ; expected, but ')' found stm32l1xx_aes.c
140 424 '}' expected ';' found stm32l1xx_aes.c
202 324 Undeclared identifier 'assert_param' in expression stm32l1xx_aes.c
202 317 Operator '' is not applicable to these operands '' stm32l1xx_aes.c
202 402 ; expected, but ')' found stm32l1xx_aes.c
202 424 '}' expected ';' found stm32l1xx_aes.c
209 371 Specifier needed stm32l1xx_aes.c
209 396 Invalid declarator expected'(' or identifier stm32l1xx_aes.c
212 371 Specifier needed stm32l1xx_aes.c
... etc etc etc ...
0 102 Finished (with errors): 08 ott 2013, 17:15:07 Test_STM32L_mio_01.mcpar
I followed the procedures of example test (STM Test.zip) and I tried to do the same thing with a new project on STM32L152 (Discovery board).
1) replaced the stdint.h file
2) set data type other (int 4 byte)
3) added into project, through project manager, desired STM peripheral library sources and header files
4) modified core_cm3.h and core_cmInstr.h files
Note: the main.c file is empty (I try to build only the library files)
ST library version
******************************************************************************
* @file misc.h
* @author MCD Application Team
* @version V1.1.1
* @date 05-March-2012
******************************************************************************
I can't attach the .zip file of the project because it's more than 256Kb (about 880 Kb)...
Unfortunately, many errors appear:
0 122 Compilation Started Test_STM32L_mio_01.c
3 123 Compiled Successfully Test_STM32L_mio_01.c
0 122 Compilation Started stm32l1xx.h
597 1503 Result is not defined in function: '__REV' core_cminstr.h
122 324 Undeclared identifier 'assert_param' in expression misc.c
122 317 Operator '' is not applicable to these operands '' misc.c
122 402 ; expected, but ')' found misc.c
122 424 '}' expected ';' found misc.c
142 324 Undeclared identifier 'assert_param' in expression misc.c
142 317 Operator '' is not applicable to these operands '' misc.c
142 402 ; expected, but ')' found misc.c
142 424 '}' expected ';' found misc.c
139 1163 Variable 'tmppriority' has been declared, but not used misc.c
139 1163 Variable 'tmppre' has been declared, but not used misc.c
139 1163 Variable 'tmpsub' has been declared, but not used misc.c
163 371 Specifier needed misc.c
163 396 Invalid declarator expected'(' or identifier misc.c
166 371 Specifier needed misc.c
166 300 Syntax Error: ')' expected, but '*' found misc.c
166 371 Specifier needed misc.c
166 300 Syntax Error: ')' expected, but '0xE000E000UL' found misc.c
166 402 ; expected, but '+' found misc.c
166 312 Internal error '' misc.c
0 122 Compilation Started stm32l1xx.h
597 1503 Result is not defined in function: '__REV' core_cminstr.h
193 324 Undeclared identifier 'assert_param' in expression stm32l1xx_adc.c
193 317 Operator '' is not applicable to these operands '' stm32l1xx_adc.c
193 317 Operator '' is not applicable to these operands '' stm32l1xx_adc.c
193 402 ; expected, but ')' found stm32l1xx_adc.c
193 424 '}' expected ';' found stm32l1xx_adc.c
202 371 Specifier needed stm32l1xx_adc.c
202 396 Invalid declarator expected'(' or identifier stm32l1xx_adc.c
223 324 Undeclared identifier 'assert_param' in expression stm32l1xx_adc.c
223 317 Operator '' is not applicable to these operands '' stm32l1xx_adc.c
223 317 Operator '' is not applicable to these operands '' stm32l1xx_adc.c
223 402 ; expected, but ')' found stm32l1xx_adc.c
223 424 '}' expected ';' found stm32l1xx_adc.c
219 1163 Variable 'tmpreg1' has been declared, but not used stm32l1xx_adc.c
220 1163 Variable 'tmpreg2' has been declared, but not used stm32l1xx_adc.c
270 1503 Result is not defined in function: '' stm32l1xx_adc.c
270 312 Internal error '' stm32l1xx_adc.c
1 122 Compilation Started stm32l1xx_adc.c
597 1503 Result is not defined in function: '__REV' core_cminstr.h
140 324 Undeclared identifier 'assert_param' in expression stm32l1xx_aes.c
140 317 Operator '' is not applicable to these operands '' stm32l1xx_aes.c
140 402 ; expected, but ')' found stm32l1xx_aes.c
140 424 '}' expected ';' found stm32l1xx_aes.c
202 324 Undeclared identifier 'assert_param' in expression stm32l1xx_aes.c
202 317 Operator '' is not applicable to these operands '' stm32l1xx_aes.c
202 402 ; expected, but ')' found stm32l1xx_aes.c
202 424 '}' expected ';' found stm32l1xx_aes.c
209 371 Specifier needed stm32l1xx_aes.c
209 396 Invalid declarator expected'(' or identifier stm32l1xx_aes.c
212 371 Specifier needed stm32l1xx_aes.c
... etc etc etc ...
0 102 Finished (with errors): 08 ott 2013, 17:15:07 Test_STM32L_mio_01.mcpar
- marina.petrovic
- Posts: 2986
- Joined: 18 Apr 2013 08:11
Re: mikroC ARM V3.0 and ST Standard Peripherals Library
Hi,
Did you check Case sensitive checkbox in Tools -> Options -> Output Settings?
Best regards,
Marina
Did you check Case sensitive checkbox in Tools -> Options -> Output Settings?
Best regards,
Marina
-
- Posts: 20
- Joined: 01 Oct 2012 15:34
Re: mikroC ARM V3.0 and ST Standard Peripherals Library
Sorry, I forgot the fifth point:
5) check Case sensitive checkbox in Tools -> Options -> Output Settings
Yes, I did.
Here there is the project zip file
https://docs.google.com/file/d/0B4rAq6t ... sp=sharing
Thank you and best regards.
Andrea
5) check Case sensitive checkbox in Tools -> Options -> Output Settings
Yes, I did.
Here there is the project zip file
https://docs.google.com/file/d/0B4rAq6t ... sp=sharing
Thank you and best regards.
Andrea
Re: mikroC ARM V3.0 and ST Standard Peripherals Library
Thanks Marina,
The new STM Test project does the trick
Regards
Brett
The new STM Test project does the trick
Regards
Brett
Re: mikroC ARM V3.0 and ST Standard Peripherals Library
Thank you for this sample project that compiled fine on my system.
BUT: things like "GPIO_InitTypeDef GPIO_InitStructure;" appear underlined in red and "Find Declaration" doesn't find anything.
How can I fix that, please?
Thanks,
Cat
BUT: things like "GPIO_InitTypeDef GPIO_InitStructure;" appear underlined in red and "Find Declaration" doesn't find anything.
How can I fix that, please?
Thanks,
Cat
-
- Posts: 20
- Joined: 01 Oct 2012 15:34
Re: mikroC ARM V3.0 and ST Standard Peripherals Library
Hello MArina,
something has changed after I copied the defines.pld file from STM Test to my project directory.
The compiler generates less error messages.
(Warning) 595 1503 Result is not defined in function: '__REV' core_cminstr.h
410 396 Invalid declarator expected'(' or identifier stm32l1xx_dac.c
413 424 '}' expected ';' found stm32l1xx_dac.c
422 371 Specifier needed stm32l1xx_dac.c
422 396 Invalid declarator expected'(' or identifier stm32l1xx_dac.c
424 324 Undeclared identifier 'Data2' in expression stm32l1xx_dac.c
424 324 Undeclared identifier 'Data1' in expression stm32l1xx_dac.c
60 393 'FLASH_BUSY' Identifier redefined stm32l1xx_flash.h
60 393 'FLASH_ERROR_WRP' Identifier redefined stm32l1xx_flash.h
60 393 'FLASH_COMPLETE' Identifier redefined stm32l1xx_flash.h
60 393 'FLASH_TIMEOUT' Identifier redefined stm32l1xx_flash.h
443 402 ; expected, but 'FLASH_RUNPowerDownCmd' found stm32l1xx_flash.h
444 402 ; expected, but 'FLASH_EraseParallelPage' found stm32l1xx_flash.h
444 393 '__RAM_FUNC' Identifier redefined stm32l1xx_flash.h
445 402 ; expected, but 'FLASH_ProgramHalfPage' found stm32l1xx_flash.h
445 393 '__RAM_FUNC' Identifier redefined stm32l1xx_flash.h
446 402 ; expected, but 'FLASH_ProgramParallelHalfPage' found stm32l1xx_flash.h
446 393 '__RAM_FUNC' Identifier redefined stm32l1xx_flash.h
446 312 Internal error '' stm32l1xx_flash.h
also similar errors for stm32l1xx_lcd.c and stm32l1xx_tim.c
This's the project folder:
https://docs.google.com/file/d/0B4rAq6t ... sp=sharing
Best regards.
Andrea
something has changed after I copied the defines.pld file from STM Test to my project directory.
The compiler generates less error messages.
(Warning) 595 1503 Result is not defined in function: '__REV' core_cminstr.h
410 396 Invalid declarator expected'(' or identifier stm32l1xx_dac.c
413 424 '}' expected ';' found stm32l1xx_dac.c
422 371 Specifier needed stm32l1xx_dac.c
422 396 Invalid declarator expected'(' or identifier stm32l1xx_dac.c
424 324 Undeclared identifier 'Data2' in expression stm32l1xx_dac.c
424 324 Undeclared identifier 'Data1' in expression stm32l1xx_dac.c
60 393 'FLASH_BUSY' Identifier redefined stm32l1xx_flash.h
60 393 'FLASH_ERROR_WRP' Identifier redefined stm32l1xx_flash.h
60 393 'FLASH_COMPLETE' Identifier redefined stm32l1xx_flash.h
60 393 'FLASH_TIMEOUT' Identifier redefined stm32l1xx_flash.h
443 402 ; expected, but 'FLASH_RUNPowerDownCmd' found stm32l1xx_flash.h
444 402 ; expected, but 'FLASH_EraseParallelPage' found stm32l1xx_flash.h
444 393 '__RAM_FUNC' Identifier redefined stm32l1xx_flash.h
445 402 ; expected, but 'FLASH_ProgramHalfPage' found stm32l1xx_flash.h
445 393 '__RAM_FUNC' Identifier redefined stm32l1xx_flash.h
446 402 ; expected, but 'FLASH_ProgramParallelHalfPage' found stm32l1xx_flash.h
446 393 '__RAM_FUNC' Identifier redefined stm32l1xx_flash.h
446 312 Internal error '' stm32l1xx_flash.h
also similar errors for stm32l1xx_lcd.c and stm32l1xx_tim.c
This's the project folder:
https://docs.google.com/file/d/0B4rAq6t ... sp=sharing
Best regards.
Andrea
- marina.petrovic
- Posts: 2986
- Joined: 18 Apr 2013 08:11
Re: mikroC ARM V3.0 and ST Standard Peripherals Library
Hi,
Please, can you try the example from attachment?
There are some adjustment.
In ...\Prova_lib_1\CMSIS\Device\ST\STM32L1xx\Include\stm32l1xx.h added:
In defines.pld added:
Best regards,
Marina
Please, can you try the example from attachment?
There are some adjustment.
In ...\Prova_lib_1\CMSIS\Device\ST\STM32L1xx\Include\stm32l1xx.h added:
Code: Select all
#define __RAM_FUNC FLASH_Status
Code: Select all
data=__data
Marina
- Attachments
-
- Prova_lib_1.rar
- (574.92 KiB) Downloaded 206 times
-
- Posts: 20
- Joined: 01 Oct 2012 15:34
Re: mikroC ARM V3.0 and ST Standard Peripherals Library
Dear Marina,
thanks for your kind support.
I tried to compile the project but but unfortunately there are still errors.
Attached the report file (.doc) with error messages displayed in red.
Regards
Andrea
thanks for your kind support.
I tried to compile the project but but unfortunately there are still errors.
Attached the report file (.doc) with error messages displayed in red.
Regards
Andrea
- Attachments
-
- Report for Marina.zip
- (5.13 KiB) Downloaded 198 times
- marina.petrovic
- Posts: 2986
- Joined: 18 Apr 2013 08:11
Re: mikroC ARM V3.0 and ST Standard Peripherals Library
Hi,
I am very sorry for the inconvenience.
Problem occurs because all libraries in Library Manager was checked.
Please, try the project from attachment and un-check the unnecessary library in Library Manager.
Best regards,
Marina
I am very sorry for the inconvenience.
Problem occurs because all libraries in Library Manager was checked.
Please, try the project from attachment and un-check the unnecessary library in Library Manager.
Best regards,
Marina
- Attachments
-
- Prova_lib_1.rar
- (574.51 KiB) Downloaded 257 times
-
- Posts: 20
- Joined: 01 Oct 2012 15:34
Re: mikroC ARM V3.0 and ST Standard Peripherals Library
Thank you very much Marina, all errors are gone
I also removed the USB library that caused some other error.
Forgive my ignorance but why I have to un-check only some libraries?
Are they in conflict with those contained in STM32L1xx_StdPeriph_Driver\src directory (for example USB) ?
What is the difference between Prova_lib_1.rar (10-10-2013) version and Prova_lib_1.rar (11-10-2013)?
I tried to un-check all the librarie in Library Manager form 10-10-2013 version but errors remain ...
Again many thanks.
Best regards.
Andrea
I also removed the USB library that caused some other error.
Forgive my ignorance but why I have to un-check only some libraries?
Are they in conflict with those contained in STM32L1xx_StdPeriph_Driver\src directory (for example USB) ?
What is the difference between Prova_lib_1.rar (10-10-2013) version and Prova_lib_1.rar (11-10-2013)?
I tried to un-check all the librarie in Library Manager form 10-10-2013 version but errors remain ...
Again many thanks.
Best regards.
Andrea
Re: mikroC ARM V3.0 and ST Standard Peripherals Library
No help about this? It's about the sample you made for the STM32F4 Discovery board.
catacluj wrote:Thank you for this sample project that compiled fine on my system.
BUT: things like "GPIO_InitTypeDef GPIO_InitStructure;" appear underlined in red and "Find Declaration" doesn't find anything.
How can I fix that, please?
Thanks,
Cat
- marina.petrovic
- Posts: 2986
- Joined: 18 Apr 2013 08:11
Re: mikroC ARM V3.0 and ST Standard Peripherals Library
Hi,
The only difference between the two version of project that I attached is, somehow in first project,
almost all library remained included in Library manager.
Like you already notice, some of our libraries are in "conflict" with ST Standard Peripherals Library.
For example, in our Flash Memory Library we use constant with the same name like one in ST Standard Peripherals Library.
As regarding, "Find Declaration" problem, I managed to reproduce the same behavior.
I will pass that problem to our software developers and they will try to correct it as soon as possible.
Thank you, catacluj, for pointing out that behavior and sorry for the inconvenience.
Best regards,
Marina
The only difference between the two version of project that I attached is, somehow in first project,
almost all library remained included in Library manager.
Like you already notice, some of our libraries are in "conflict" with ST Standard Peripherals Library.
For example, in our Flash Memory Library we use constant with the same name like one in ST Standard Peripherals Library.
As regarding, "Find Declaration" problem, I managed to reproduce the same behavior.
I will pass that problem to our software developers and they will try to correct it as soon as possible.
Thank you, catacluj, for pointing out that behavior and sorry for the inconvenience.
Best regards,
Marina
-
- Posts: 20
- Joined: 01 Oct 2012 15:34
Re: mikroC ARM V3.0 and ST Standard Peripherals Library
Ok Marina, thank you very much.
Best regards.
Andrea
Best regards.
Andrea
-
- Posts: 5
- Joined: 20 Jul 2010 04:59
Re: mikroC ARM V3.0 and ST Standard Peripherals Library
Can somebody help with STM32F2xx standard peripheral library with MikroC? I did as in the posts above for the STM32F10x series and it worked well but I can't do the same for STM32F2xx series.