7 years ago.

How to import PeripheralPins.c to edit.

I need to edit PeripheralPins.c to reassign some pins. What is the best way to import it to allow editing. Importing mbed-dev for stm32f767zi gives errors on compilation. Just importing peripheralpins.c to use with mbed-os gives multiply defined symbol errors on compilation.

2 Answers

7 years ago.

Mbed-dev is the way to go. If it gives errors on compilation something is wrong.

However what do you want to change? It is not something you can change to make it easier, those are hardware connections inside the microcontroller: It is just a description of what is there, you can change the description, but it won't work. (Unless some connections which do exist are missing from the file).

See my previous post about the compiler errors https://developer.mbed.org/questions/77608/Importing-mbed-dev-to-edit-PeripheralPin/ .

I am aware of the limitations of the connections. The problem I have is that MBED is stopping some of the pins working correctly. I am using some CubeMX generated code to do some PWM DMA. I am trying to use some pins of the the timer TIM4 channels 3 and 4. This equates to D9 and D10 on the board. D9 works without problem, D10 doesn't work. I tried some CubeMX PWM code and that worked on D9 but not on D10 as well. I then add PwmOut(D10) and then that PWM code worked. This didn't work for the PWM DMA code though

posted by David Fisher 31 Mar 2017

I've found the source of the compiler error. I had included stm32f7xx_hal_conf.h from my CubeMx program. However I still can't get D9 to output the PWM DMA signal. I have tried commenting out the code where TIM4_4 is mentioned in PeripheralPins.c but it doesn't work ?

posted by David Fisher 31 Mar 2017
7 years ago.

Hello David,

Try the followings:

  • Create a new "Blinky LED Hello World" program for the "mbed LPC1768" target.
  • Delete the mbed library from the project
  • Import the mbed-dev library into the project
  • Change the target to NUCLEO-F767ZI

Such project compiled for me with success.