Can't compile anything for my NetduinoPlus2

Windows XP,Vista,7,8 and 8.1 etc
SirTmofBates
Posts: 3
Joined: Wed Jun 07, 2017 2:54 pm

Can't compile anything for my NetduinoPlus2

Post by 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:

Code: Select all

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
Posts: 1605
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: Can't compile anything for my NetduinoPlus2

Post by 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
Posts: 3
Joined: Wed Jun 07, 2017 2:54 pm

Re: Can't compile anything for my NetduinoPlus2

Post by 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

User avatar
martinayotte
Posts: 1222
Joined: Mon Apr 27, 2015 1:45 pm

Re: Can't compile anything for my NetduinoPlus2

Post by martinayotte » Thu Jul 06, 2017 7:11 pm

stevestrong wrote:
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
Posts: 1605
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: Can't compile anything for my NetduinoPlus2

Post by 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.

User avatar
martinayotte
Posts: 1222
Joined: Mon Apr 27, 2015 1:45 pm

Re: Can't compile anything for my NetduinoPlus2

Post by martinayotte » Thu Jul 06, 2017 8:08 pm

With #ifdef, I presume ...

zmemw16
Posts: 1416
Joined: Wed Jul 08, 2015 2:09 pm
Location: St Annes, Lancs,UK

Re: Can't compile anything for my NetduinoPlus2

Post by 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
Posts: 1605
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: Can't compile anything for my NetduinoPlus2

Post by 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
Posts: 1605
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: Can't compile anything for my NetduinoPlus2

Post by 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

Code: Select all

#ifdef STM32_HIGH_DENSITY
by

Code: Select all

#if defined(STM32_HIGH_DENSITY) && defined(BOARD_generic_f407v) // pins defined only for generic black F407VET board

SirTmofBates
Posts: 3
Joined: Wed Jun 07, 2017 2:54 pm

Re: Can't compile anything for my NetduinoPlus2

Post by 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.

Code: Select all

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

Post Reply