Netduino 2 Plus

Limited support for STM32F4 Discovery, Nucleo and custom F4 boards
User avatar
RogerClark
Posts: 7541
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Netduino 2 Plus

Post by RogerClark » Thu May 28, 2015 9:31 pm

Thanks Martin

Will the changes effect other boards or is it via a #define for your board?

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

Re: Netduino 2 Plus

Post by martinayotte » Thu May 28, 2015 9:50 pm

Hi Roger,

I added it using the #ifdef ARDUINO_STM32F4_NETDUINO2PLUS, since this define was already generated by the boards/platforms mecanism.

You will also notice that I added a possible fifth argument to maple_upload, if provided, it will add "--dfuse-address" to the call to dfu-util.
This should not affect others too. (BTW, I added this because my dfu-util complains that the binary is not a *.dfu file, raw files seems to require this dfuse-address.)

User avatar
RogerClark
Posts: 7541
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Netduino 2 Plus

Post by RogerClark » Thu May 28, 2015 9:56 pm

Martin

Ok. About the #define

Normally with the f103 I'm not keen on putting board specific stuff in the core, and I'd probably try to do this via a new variant.

But as the F4 stuff is basically an experimental spinoff, I think its ok for now, and we can sort it out when and if I ever merge the F4 and F1 code bases.


I will check it still works on my F407

Re DFU

Ok. I didn't even know it can upload via DFU, I thought it was only stlink

Or did you add this.

Anyway

No worries

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

Re: Netduino 2 Plus

Post by martinayotte » Thu May 28, 2015 10:11 pm

Hi again Roger,
In fact, your F407 will still has the 8MHz value, only Netduino will get the 25Mhz.
During Merge or Refactoring, maybe it is a good idea to have some kind "board.ext_osc=25" or "board.ext_osc=8", but for now, I think the #ifdef is simplier. I've look to my F429 board, and it is also a 8MHz. So, I presume that the only boards with different oscillators are the one sharing it with PHY.

About DFU, since I didn't have my new ST-Link yet, I didn't have much choice for uploads, even with my maple-mini :
Relying on DFU or Serial available thru Boot0 push button as described in STM docs.
When I first assembled the Frank's STM32Stamp, I was using Serial with stm32loader.py, but it is less convenient.
So, that why I added it for those two boards STM32Stamp and Netduino.

User avatar
RogerClark
Posts: 7541
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Netduino 2 Plus

Post by RogerClark » Thu May 28, 2015 11:01 pm

Matrin,

OK. Adding serial is easy.

I'm not sure how you managed to upload via DFU, don't you need a bootloader ??

I wasnt aware of a maple bootloader for F4. The F1 bootloader almost certainly won't work on F4 as the setup and GPIO control etc are different.

But I'm sure it could be ported.

At the moment, the F4 code seems to have support for USB OTG, but I'm not entirely sure what it does. I tried to connect the OTG port to my PC but it doesnt enumerate, so I suspect is a USB host.

ummm.

Its starting to look more and more like I need to start the difficult process of merging the F4 and F1 codebase, but I suspect its days of work :-(

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

Re: Netduino 2 Plus

Post by martinayotte » Thu May 28, 2015 11:19 pm

Hi Roger,

For DFU, it is using the ROM bootloader which is provided by STM, it look to Serial port but also to USB, as long as the Boot0 is pushed while powering up. So, my sketch is loaded without any other bootloader for now.

And when I was mentioning a TCP bootloader, it doesn't mean that all the code from your current bootloader is needed, maybe only few helpers, so don't worry to much about that ... ;)

User avatar
RogerClark
Posts: 7541
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Netduino 2 Plus

Post by RogerClark » Fri May 29, 2015 4:36 am

Martin,

OK about the built in DFU on the F4. On the F1 when boot0 is high on boot, it goes into serial bootloader mode, which is what I used to use all the time.

However now we have a generic bootloader that doesnt need any special external hardware on the F1 I tend to use that most of the time.

To do TCP uploads, I cant see how you can do that without either an external processor or a bootloader that communicates over TCP.
a TCP bootloader would be a lot different from the one on the F1, which is DFU

I'm not sure if there are any standards for TCP re-flashing, I guess so, as I think they were discussing it on the ESP8266 forum, but it could be a built in feature on the ESP8266 as its inherently a network device.

User avatar
mrburnette
Posts: 2031
Joined: Mon Apr 27, 2015 12:50 pm
Location: Greater Atlanta
Contact:

Re: Netduino 2 Plus

Post by mrburnette » Fri May 29, 2015 2:22 pm

RogerClark wrote:<..>
To do TCP uploads, I cant see how you can do that without either an external processor or a bootloader that communicates over TCP.
a TCP bootloader would be a lot different from the one on the F1, which is DFU

I'm not sure if there are any standards for TCP re-flashing, I guess so, as I think they were discussing it on the ESP8266 forum, but it could be a built in feature on the ESP8266 as its inherently a network device.
Interesting project: http://usbip.sourceforge.net/

Image

Ray

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

Re: Netduino 2 Plus

Post by martinayotte » Fri May 29, 2015 2:53 pm

@Ray, Indeed, it is interesting. I've tried it several years ago. But it serves completely different purposes : sharing USB devices across network.
@Roger, Effectively, there are not any standard. I'm following the ESP forums too, and recently, someone came up with RBoot, which I didn't tried yet ...

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

Re: Netduino 2 Plus

Post by martinayotte » Mon Jun 08, 2015 10:12 pm

After the NSS vs CSN saga on SPI, I got the MicroSD working on my Netduino2Plus. I've used the SD lib, but I will try again Victor's SdFat, it should work too since the problem was that famous NSS issue ...

Post Reply