cancel
Showing results for 
Search instead for 
Did you mean: 

Mikroe MINI-M4 with GCC

fabi
Associate II
Posted on October 21, 2016 at 20:16

Hello,

I recently bought a Mikroe M4 developement board with a STM32F415RG to test the embedded crypto. The devboard manufacturer only gives support for his own proprietory C compiler, so I'm currently figuring out on my own how to get GCC with Visual GDB to work.

The compilation runs through without any problems, but the uploaded code doesn't run on the device. I guess its because of the bootloader which only allows a clock rate of 120Mhz (informations are rare for this board), since I have no debugger my capabilities are limited.

At first I tried the Visual GDB example blink code with support for the given mcu, but nothing happened on the device.

At the moment I'm trying my luck with the STM32 Cube to get the desired 120Mhz (Current config:

http://i.grab.la/06a14-92e22466-1f7d-4292-bbd3-c67c8cbeeb3b.png

), again the compilation runs fine but the code doesn't work on the device. I just imported the settings with Visual GDB and added a simple LED test (

http://pastebin.com/XynSR4qx

). Because this is my first stm32 I have no further ideas.

thanks for any help

#mini-m4-gcc
3 REPLIES 3
Posted on October 24, 2016 at 02:06

If you write code that builds at 0x08000000 then it is going to replace whatever loader Mikroe has put on the device. ST's loader is in ROM

Things to remember are that the Mikroe board uses a 16 MHz HSE crystal, and that the HASH/CRYPT unit needs a 48 MHz clock from the PLL Q tap.

I don't have one of these boards, but I suspect if you boot into ST's loader (BOOT0 High), and use DFU mode, you should be able to fill the entire FLASH, and run the chip at 168 MHz

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
AvaTar
Lead
Posted on October 24, 2016 at 09:56

It's more than 1 year ago when I messed with such a board the last time.

First - it has no onboard debug pod, you need an external one. But at least the board has a debug connector.

Second - the first thing I did was to erase the MikroE bootloader, as it interferes with ''normal'' debugging. If I remember correctly, you don't need to put the MCU into BOOT mode for that.

And as clive correctly mentioned, clocking is different.

fabi
Associate II
Posted on October 25, 2016 at 04:59

Thank you very much guys!

I ordered a ST-Link v2 today and trying the flash again as soon as the programmer arrives.