Author Topic: Adding STM32F4 peripheral lib to Keil project  (Read 6718 times)

0 Members and 1 Guest are viewing this topic.

Offline TorrentulaTopic starter

  • Regular Contributor
  • *
  • Posts: 91
  • Country: de
    • My blog
Adding STM32F4 peripheral lib to Keil project
« on: September 16, 2012, 04:29:43 pm »
Hey guys!

Because of the recent uprising STM32F-Series posts in here I thought I'd give the STM32F4 another chance. I have given up trying to use GCC loads of errors because filenames and locations are changing frequently.

So now I'm trying to add the STM32F4 peripheral library to my project in the Keil IDE. I have tried adding it as a group but when I try to compile it, the compiler complains about 'assert_param' being defined implicitly.
I'm sure there should be some simple fix (maybe a file I have forgotten to include) but I can't seem to figure it out...

Thanks in advance :)
 

Offline Bored@Work

  • Super Contributor
  • ***
  • Posts: 3932
  • Country: 00
Re: Adding STM32F4 peripheral lib to Keil project
« Reply #1 on: September 16, 2012, 04:52:32 pm »
Because of the recent uprising STM32F-Series posts in here I thought I'd give the STM32F4 another chance. I have given up trying to use GCC loads of errors because filenames and locations are changing frequently.

That statement doesn't make sense.

Quote
So now I'm trying to add the STM32F4 peripheral library to my project in the Keil IDE. I have tried adding it as a group but when I try to compile it, the compiler complains about 'assert_param' being defined implicitly.

That can't be. We have just been told that Keil is painless and worry-free.
I delete PMs unread. If you have something to say, say it in public.
For all else: Profile->[Modify Profile]Buddies/Ignore List->Edit Ignore List
 

Offline TorrentulaTopic starter

  • Regular Contributor
  • *
  • Posts: 91
  • Country: de
    • My blog
Re: Adding STM32F4 peripheral lib to Keil project
« Reply #2 on: September 16, 2012, 05:48:41 pm »
Okay I might not have been very precise so I'll try again:

I need to somehow include the STM32F4 peripheral library provided by ST into my Keil project so I can use the peripherals like USART, SPI, I2C etc. without having to care about setting each individual bit (quite cumbersome to do this e.g. for all 4 USARTs).

I believe Keil is painless after you've got everything set up correctly. Until then there are quite a lot of obscure menus which you need to figure out.
 

Online Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11632
  • Country: my
  • reassessing directives...
Re: Adding STM32F4 peripheral lib to Keil project
« Reply #3 on: September 17, 2012, 03:33:03 am »
I believe Keil is painless after you've got everything set up correctly.
you mean.. anykind of softwares/IDEs? paid or unpaid?

if you are me, and i dont know shit where that 'assert_param' located, i'll either
1) step debug it until it reaches there.
2) start a brute force search for keyword 'assert_param' in every related folders.
3) both (1) and (2) and (1) again and (2) etc etc
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline andersm

  • Super Contributor
  • ***
  • Posts: 1198
  • Country: fi
Re: Adding STM32F4 peripheral lib to Keil project
« Reply #4 on: September 17, 2012, 11:59:29 am »
In ST's STM32F1 libraries, the assert_param macro is defined in the stm32f10x_conf.h header file which is included in the project templates. I don't remember how/where you were supposed to #include the header, but I assume the STM32F4 libs have a similar setup.

BTW, one big annoyance I had with Keil's IDE is that it always, unconditionally adds its bundled copy of the firmware library to your include paths. If you try to add another version to your project, you'll get completely insane, undiagnosable build errors until everything is configured exactly right.

Offline HackedFridgeMagnet

  • Super Contributor
  • ***
  • Posts: 2028
  • Country: au
Re: Adding STM32F4 peripheral lib to Keil project
« Reply #5 on: September 17, 2012, 03:31:01 pm »
can you put in ifdef directive in?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf