Can’t compile anything for my NetduinoPlus2

SirTmofBates
Wed Jul 05, 2017 7:22 pm
After installing STM32Duino into the arduino IDE, not matter how many times I try, the code won’t compile.

The just IDE spits out a bunch of errors:
Arduino: 1.6.13 (Windows 10), Board: "Netduino2 F405, USB inactive"

D:\Documents\Arduino\hardware\Arduino_STM32\STM32F4\cores\maple\libmaple\fsmc.c:48:29: error: 'FSMC_NOE' undeclared here (not in a function)

const uint8_t fsmc_pins[]= {FSMC_NOE, FSMC_NWE, FSMC_NE1, FSMC_A18,

^

D:\Documents\Arduino\hardware\Arduino_STM32\STM32F4\cores\maple\libmaple\fsmc.c:48:39: error: 'FSMC_NWE' undeclared here (not in a function)

const uint8_t fsmc_pins[]= {FSMC_NOE, FSMC_NWE, FSMC_NE1, FSMC_A18,

^

D:\Documents\Arduino\hardware\Arduino_STM32\STM32F4\cores\maple\libmaple\fsmc.c:48:49: error: 'FSMC_NE1' undeclared here (not in a function)

const uint8_t fsmc_pins[]= {FSMC_NOE, FSMC_NWE, FSMC_NE1, FSMC_A18,

^

D:\Documents\Arduino\hardware\Arduino_STM32\STM32F4\cores\maple\libmaple\fsmc.c:48:59: error: 'FSMC_A18' undeclared here (not in a function)

const uint8_t fsmc_pins[]= {FSMC_NOE, FSMC_NWE, FSMC_NE1, FSMC_A18,

^

D:\Documents\Arduino\hardware\Arduino_STM32\STM32F4\cores\maple\libmaple\fsmc.c:49:8: error: 'FSMC_D0' undeclared here (not in a function)

FSMC_D0, FSMC_D1, FSMC_D2, FSMC_D3,

^

D:\Documents\Arduino\hardware\Arduino_STM32\STM32F4\cores\maple\libmaple\fsmc.c:49:17: error: 'FSMC_D1' undeclared here (not in a function)

FSMC_D0, FSMC_D1, FSMC_D2, FSMC_D3,

^

D:\Documents\Arduino\hardware\Arduino_STM32\STM32F4\cores\maple\libmaple\fsmc.c:49:26: error: 'FSMC_D2' undeclared here (not in a function)

FSMC_D0, FSMC_D1, FSMC_D2, FSMC_D3,

^

D:\Documents\Arduino\hardware\Arduino_STM32\STM32F4\cores\maple\libmaple\fsmc.c:49:35: error: 'FSMC_D3' undeclared here (not in a function)

FSMC_D0, FSMC_D1, FSMC_D2, FSMC_D3,

^

D:\Documents\Arduino\hardware\Arduino_STM32\STM32F4\cores\maple\libmaple\fsmc.c:50:8: error: 'FSMC_D4' undeclared here (not in a function)

FSMC_D4, FSMC_D5, FSMC_D6, FSMC_D7,

^

D:\Documents\Arduino\hardware\Arduino_STM32\STM32F4\cores\maple\libmaple\fsmc.c:50:17: error: 'FSMC_D5' undeclared here (not in a function)

FSMC_D4, FSMC_D5, FSMC_D6, FSMC_D7,

^

D:\Documents\Arduino\hardware\Arduino_STM32\STM32F4\cores\maple\libmaple\fsmc.c:50:26: error: 'FSMC_D6' undeclared here (not in a function)

FSMC_D4, FSMC_D5, FSMC_D6, FSMC_D7,

^

D:\Documents\Arduino\hardware\Arduino_STM32\STM32F4\cores\maple\libmaple\fsmc.c:50:35: error: 'FSMC_D7' undeclared here (not in a function)

FSMC_D4, FSMC_D5, FSMC_D6, FSMC_D7,

^

D:\Documents\Arduino\hardware\Arduino_STM32\STM32F4\cores\maple\libmaple\fsmc.c:51:8: error: 'FSMC_D8' undeclared here (not in a function)

FSMC_D8, FSMC_D9, FSMC_D10, FSMC_D11,

^

D:\Documents\Arduino\hardware\Arduino_STM32\STM32F4\cores\maple\libmaple\fsmc.c:51:17: error: 'FSMC_D9' undeclared here (not in a function)

FSMC_D8, FSMC_D9, FSMC_D10, FSMC_D11,

^

D:\Documents\Arduino\hardware\Arduino_STM32\STM32F4\cores\maple\libmaple\fsmc.c:51:26: error: 'FSMC_D10' undeclared here (not in a function)

FSMC_D8, FSMC_D9, FSMC_D10, FSMC_D11,

^

D:\Documents\Arduino\hardware\Arduino_STM32\STM32F4\cores\maple\libmaple\fsmc.c:51:36: error: 'FSMC_D11' undeclared here (not in a function)

FSMC_D8, FSMC_D9, FSMC_D10, FSMC_D11,

^

D:\Documents\Arduino\hardware\Arduino_STM32\STM32F4\cores\maple\libmaple\fsmc.c:52:8: error: 'FSMC_D12' undeclared here (not in a function)

FSMC_D12, FSMC_D13, FSMC_D14, FSMC_D15};

^

D:\Documents\Arduino\hardware\Arduino_STM32\STM32F4\cores\maple\libmaple\fsmc.c:52:18: error: 'FSMC_D13' undeclared here (not in a function)

FSMC_D12, FSMC_D13, FSMC_D14, FSMC_D15};

^

D:\Documents\Arduino\hardware\Arduino_STM32\STM32F4\cores\maple\libmaple\fsmc.c:52:28: error: 'FSMC_D14' undeclared here (not in a function)

FSMC_D12, FSMC_D13, FSMC_D14, FSMC_D15};

^

D:\Documents\Arduino\hardware\Arduino_STM32\STM32F4\cores\maple\libmaple\fsmc.c:52:38: error: 'FSMC_D15' undeclared here (not in a function)

FSMC_D12, FSMC_D13, FSMC_D14, FSMC_D15};

^

exit status 1
Error compiling for board Netduino2 F405.
[/code}


stevestrong
Wed Jul 05, 2017 8:14 pm
Can you please provide more info about your board (schematic, pinout)?
The current error messages are related to FSMC, i do not know the pinout of that board.

SirTmofBates
Wed Jul 05, 2017 8:47 pm
Here’s a link to the Netduino Plus 2’s schematic
http://www.netduino.com/netduinoplus2/schematic.pdf

An image as well for reference:
Image


martinayotte
Thu Jul 06, 2017 7:11 pm
[stevestrong – Wed Jul 05, 2017 8:14 pm] –
Can you please provide more info about your board (schematic, pinout)?
The current error messages are related to FSMC, i do not know the pinout of that board.

Steve ? I’ve been the first to bring Netduino2Plus working with Arduino_STM32 more than 2 years ago, and it has been added to Wiki pages too.
It was compiling fine until recently …
I must admit that I didn’t sync my github since a while and still didn’t sync yet fortunately, but here is the offending commit :
https://github.com/rogerclarkmelbourne/ … 47046269b2

EDIT : digging a bit more, I think the generic_f407v/generic_f407v.h include isn’t simply included for the other variant, ie: discovery_f407, or equivalent defines need to be added to discovery_f407.h


stevestrong
Thu Jul 06, 2017 7:20 pm
I see that this board doesnt even support FSMC, so i will just disable the fsmc stuff for netduino2plus.

martinayotte
Thu Jul 06, 2017 8:08 pm
With #ifdef, I presume …

zmemw16
Thu Jul 06, 2017 8:15 pm
i thought that and looked up the datasheet for the chip, it has, page 23
2.2.9
Flexible static memory controller (FSMC)
The FSMC is embedded in the STM32F405xx and STM32F407xx family. It has four Chip
Select outputs supporting the following modes: PCCard/Compact Flash, SRAM, PSRAM,
NOR Flash and NAND Flash.
Functionality overview:

Write FIFO

Maximum FSMC_CLK frequency for synchronous accesses is 60 MHz.

stephen


stevestrong
Thu Jul 06, 2017 8:20 pm
Sure it has fsmc since it is a 407vet6 chip, just like what the black generic and the disco board have.
It is a 405rgt6 chip, but those chip pins are not connected to the board pins.
Yes, i will allow the fsmc stuff with ifdef only for the generic board.

stevestrong
Fri Jul 07, 2017 1:20 pm
I just checked the situation, the official (Roger’s) repo does not contain yet the latest version.
If you check my master branch it should compile fine for you, there is the FSMC already restricted only for generic black F407VET board, I did it 4 days ago.

Actually you could manually replace line 35 of fsmc.c
#ifdef STM32_HIGH_DENSITY


SirTmofBates
Fri Jul 07, 2017 3:46 pm
Using your master branch fixed that problem, but now it seems that whenever I try to upload to the board it can’t reset the board.
An error occurred while uploading the sketch
maple_loader v0.1
Resetting to bootloader via DTR pulse
Reset via USB Serial Failed! Did you select the right serial port?
Searching for DFU device [0483:df11]...
Assuming the board is in perpetual bootloader mode and continuing to attempt dfu programming...

dfu-util - (C) 2007-2008 by OpenMoko Inc.
Couldn't find the DFU device: [0483:df11] This program is Free Software and has ABSOLUTELY NO WARRANTY


stevestrong
Fri Jul 07, 2017 3:54 pm
This is because the upload only works currently with the STLink probe, not DFU like you tried.
At least I don’t know about any DFU bootloader for F4 family which is working on windows, but I may be wrong.

Arduino IDE should actually upload only by STlink, don’t know why it tried to upload over DFU…

EDIT
I know why, because it is set this way in boards.txt.
And I don’t know how the Netduino creators planned the upload method, but according to the getting started document it should use USB.
You could try to push the RESET button when Arduino is displaying the uploading message.

@Martin, were you able to upload successfully to Netduino board over DFU?


martinayotte
Sat Jul 08, 2017 2:12 pm
[stevestrong – Fri Jul 07, 2017 3:54 pm] –
@Martin, were you able to upload successfully to Netduino board over DFU?

During those past years, my Netduino2Plus was uploaded all the time with DFU with BOOT0 button, I’ve never used STLink with it since the connection is only available with pogo-pins.


stevestrong
Sat Jul 08, 2017 3:20 pm
So you have to press BOOT0 button and reset to come into bootloader mode, right? Then DFU upload should work.

martinayotte
Sun Jul 09, 2017 12:53 pm
Right ! This is the behaviour of F4xx internal bootloader.

Leave a Reply

Your email address will not be published. Required fields are marked *