Porting NETMF 4.4 to an STM32F4

Good catch. I am removing the line

// Turn on all user LEDs
CPU_GPIO_EnableOutputPin(LED2, TRUE);

from TinyBooterEntry.cpp

Edit: I get a 4th error after removing that line

another one should be
removed

#define USERBUTTON1 45

Are you referring to these lines in the platform_selector.h?

// TinyBooter entry using GPIO
#define TINYBOOTER_ENTRY_GPIO_PIN 45 // User button
#define TINYBOOTER_ENTRY_GPIO_STATE FALSE // Active low
#define TINYBOOTER_ENTRY_GPIO_RESISTOR RESISTOR_DISABLED

yes from there you removed those two constant that are used on the another files

I did not remove the User Button part.

I re-added #define led2 and I still get 3 errors

…it keeps saying stuff about STM32F4_blconfig_STM32F401 missing

i created from my files new one check your mail (also you have compiled version with MDK) too

download (source + firmware)
https://drive.google.com/drive/folders/1tGPnvXReEFpgpN2JzS3q_NMTwN17zPxn?usp=sharing

not tested compile with GCC because i use MDK
and have no G30 MCU to test it :slight_smile:

Yayyyy thank you so much!! I deleted my version and tried compiling your version in GCC, everything ran great! I have no idea what I did wrong…probably edited too much or mistyped.

I have some G30’s as well as blank STMF401’s…now I just have to figure out how to deploy the FW without FezConfig. Do you recommend MFDeploy or what?

Tinybooter.hex

make a copy and rename as Tinybooter.s19

with dfu manager make dfu file from Tinybooter.s19

TinyBooter.dfu

than upload into G30 with Boot0+3.3V (connect those two pins with jumper) with DFU demo app

remove jumper from Boot0 + 3.3v and restart mcu

I made the .dfu file but if I plug a GHI G30 in it comes up under GHI Bootloader and does not appear in the DFU programs. Maybe it has to be a completely blank chip?

It takes me 5 hours to build a board by hand with a blank chip, so if that is the case, we won’t know until tomorrow if this works.

yes it was chip with ghi bootloader and you can upload only ghi hex
otherwise you can loose bootloader (and warranty of this bootloader) if you flash it via st-link

but you can use it with TinyCLROS and with your firmware too.

2 Likes

I am not sure I follow what you are saying

You can’t load your own firmware on G30.

Thanks to @valon_hoti_gmail_com (and others) for huge effort explaining this, very useful for anyone wanting to understand this.

Well done Sir!

5 Likes

Gus, if we purchase the same IC as used for the G30 and then use the ported TinyCLR code to programme it and create a G30, are we breaking any licensing issues here? The reason I ask is that someone posted that there was no stock of the G30 at any of the suppliers but I noticed that the same IC was in stock.

No concerns there. Anything you build on your own is yours. Even if you build from our code.

The value comes from using our firmware in having commercial support and in additional commercial features that we add separately. This will be clearer in the coming release.

4 Likes

This document made be useful for updating firmware:

1 Like

@valon_hoti_gmail_com @dweaver Not seeing anything come up on the PC when I plug a blank STM32F401 in via USB.

Do I need some STMicro USB drivers or something?

You need to put your microchip in boot loader mode.

Then follow the Update Firmware document above.

@dweaver I tried pulling PC13 low while turning on the device, isn’t that how to put it in bootloader? Nothing happens or dings

If it is boot loader mode it won’t ding but it will show up here:

STM Device in DFU Mode