2015-07-28 05:28 AM
I am a beginner with embedded programming and am using the IAR workbench for a project of mine using `STM32F4Discovery`. I am trying to compile an existing code and have a few errors at a few places regarding the bit definitions like the following:
`Error[Pe020]: identifier ''GPIO_PIN_SET'' is undefined`Now, the `GPIO_PIN_SET` is defined in the file `stm32f4xx_gpio_hal.h` and is already included in my project. In order to resolve this issue when I looked up online, I have found this solution. However, I don't have the `System` tab in the `General Options` in my IAR Workbench. I have a full version of IAR Workbench and am not sure why the `System` tab is missing. I also tried defining &sharpdefine ENABLE_BIT_DEFINITIONSas stated inhttp://supp.iar.com/Support/?note=25083
link in my `main.c` file but to no avail. Trying to set &sharpdefine STM32F4XX &sharpdefine USE_STDPERIPH_DRIVERin the `main.c` file or defining the symbols `STM32F4XX`, `USE_STDPERIPH_DRIVER` in the `Preprocessor` tab in `General Options` as mentionedhttp://dccharacter.blogspot.de/2013/03/creating-new-project-for-stm32f4.html
also didn't help.The solution could be very simple that I am probably overlooking but am not able to figure out what could I be missing. Any help would be appreciated #iar-workbenc #iar-workbenc #!stm32f4-disco #!stm32f4-disco2015-07-28 06:02 AM
You'd need to do things which are HAL specific
The compiler needs the command line defineUSE_HAL_DRIVERYour project would need it's own stm32f4xx_hal_conf.h which breaks down which include files to pull in. Which is itself pulled in via you having #include ''stm32f4xx_hal.h'' in your file.2015-07-28 06:18 AM
When I included USE_HAL_DRIVER in the defined symbols, a few of the errors are now resolved. But I still have some errors existing, for example:
Error[Pe020]: identifier ''PAN_ID'' is undefined PAN_ID is defined in a file app_cfg.h. How do I know what symbols to define for this particular file like the USE_HAL_DRIVER that you mentioned?2015-07-28 06:59 AM
I guess you'd review the project templates supplied as part of the HAL/Cube examples. Get comfortable with there construction.
You'd need to #include the files specific to your project, and where appropriate configure your ''Include Paths'' via the project options.