Getting started - Partial success - what next?

STM32F103 Nucleo boards e.g. STM Nucleo F103RB
User avatar
RogerClark
Posts: 5553
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Getting started - Partial success - what next?

Postby RogerClark » Sun May 24, 2015 11:16 am

Matthias

BTW. I tried my Nucleo F3 board this afternoon, to see if it would explain any of @sheepdoll's issues and it looks like it has the same problem

Re: Changes to core

I will try to look at them tomorrow evening i.e 1 day from now, as I'm in meetings all day tomorrow (monday)

madias
Posts: 813
Joined: Mon Apr 27, 2015 11:26 am
Location: Vienna, Austria

Re: Getting started - Partial success - what next?

Postby madias » Sun May 24, 2015 12:37 pm

I suspect, sheepdoll didn't solder the jumper for the oscillator. There was initially a piece of code in the original leafmaple nucleo variant to use the internal OSC/PLL settings, but this never works to me, so I researched and found out that on some models there is no quartz connection to the main STM32F103RB but the option to use the quartz from the ST-link adapter. This is done with 2 soldering bridges.
You can ever, without installing anything (driver, IDE...), uploading the code (*.BIN) via drag&drop.
Roger: I can remember some month ago we both were "playing" with the texane compiling and have found out, that the pre- compiled version on OSX 10.7 works on higher versions (I'm on OSX.10.9), but maybe the pre-compiled doesn't work on OSX 10.6?

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

Re: Getting started - Partial success - what next?

Postby RogerClark » Sun May 24, 2015 9:43 pm

Matthias

I had only previously tested with my stlink clone, and that still seems to work ok on OSX

And the F407 board is also recognised by texane stlink, but one other users has another F4 board they could not upload to.
So I will change the widows stlink upload.bat to use STMs exe as it seems to work for all.

I will need to double check what version of OSX is on my mac, I thought it was 10.9, and I can compile texane stlink , but it only works for my stlink clone

The "driver" code doesn't compile because the make file appears to check for OS version, so unless someone has forked and fixed this, I don't think we can do much.

I think I'd be tempted just to replace the stlink firmware with BMP instead. However there is no way back to the version of the firmware that is on the Nucleo boards, as the binary on the Russian site is a different one that doesn't have mass storage etc ( well I don't think it has mass storage).. Actually I don't even know if texane stlink works with that firmware

The problem seems or be that basically STM don't support stlink on OSX, because if they did, we could use their uploader like we do on the PC

madias
Posts: 813
Joined: Mon Apr 27, 2015 11:26 am
Location: Vienna, Austria

Re: Getting started - Partial success - what next?

Postby madias » Sun May 24, 2015 10:24 pm

Ok, let me try to summarize it (ST-Link):
On windows the STM original driver should be used.
On OSX there is no known problem with texane? I can remember, that you tried it on OSX 10.7 because my compiled version (OSX 10.9) didn't worked for you, but the 10.7 compiled version worked on OSX 10.9.
I can't believe that on OSX 10.7-9 there should be a problem with nucleo boards and upload (even for sheepdoll the upload was successful), because the ST-Link2.1 hardware is exactly the same on each board or texane didn't recognize the some F4 boards?
Flashing the nucleo board with BMP is really a bad idea, because there is no way back (as you said) and the board won't be able to use easily with other IDE's (like MBED)

User avatar
sheepdoll
Posts: 230
Joined: Fri May 22, 2015 12:58 am
Location: Silicon Valley Vortex
Contact:

Re: Getting started - Partial success - what next?

Postby sheepdoll » Sun May 24, 2015 10:43 pm

@madias

The oscillator hardware strap was the issue. Now the LED is blinking using PA5 as the pin name.

I also moved the straps on the serial port. Is there a sketch already written to test this?

Again many thanks, to those who have put countless hours into making the system work. It really does make a difference.

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

Re: Getting started - Partial success - what next?

Postby mrburnette » Mon May 25, 2015 2:23 am

Flashing the nucleo board with BMP is really a bad idea, because there is no way back (as you said) and the board won't be able to use easily with other IDE's (like MBED)


Does STlink not allow reading the contents of the STM32 flash to a binary or HEX file?

Ex: On Windows, the following creates files of the AVR contents (non-protected)

Code: Select all

avrdude -c arduino -P com9 -p ATMEGA328P -b 19200 -U flash:r:%temp%\backup_flash.hex:i

avrdude -c arduino -P com9 -p ATMEGA328P -b 19200 -U eeprom:w:\Users\owner\AppData\Local\Temp\backup_eeprom.hex

avrdude -c arduino -P com9 -p ATMEGA328P -b 19200 -U hfuse:w:\Users\owner\AppData\Local\Temp\backup_hfuse.hex

avrdude -c arduino -P com9 -p ATMEGA328P -b 19200 -U lfuse:w:\Users\owner\AppData\Local\Temp\backup_lfuse.hex

avrdude -c arduino -P com9 -p ATMEGA328P -b 19200 -U efuse:w:\Users\owner\AppData\Local\Temp\backup_efuse.hex

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

Re: Getting started - Partial success - what next?

Postby RogerClark » Mon May 25, 2015 4:35 am

Ray

ST lock the binary, so its not possible to back it up.

There is a blog entry somewhere, where someone reverse engineered the update process for the STLink and managed to capture an unencrypted binary from PC memory, but he was only able to do this because of a design mistake from STM where it unencrypted the download int memory before re-encrypting it for upload to the board.

But that's the only way of getting hold of the binary that comes with the hardware :-(, which is not a good state of affairs

But you'd need to do the hacking while you have a working board, during its update process, i.e you cant decided later to get old of the binary in that way, without doing even more hacking of the updater into thinking it was connected to a version of STLink that needed to be updated.

User avatar
sheepdoll
Posts: 230
Joined: Fri May 22, 2015 12:58 am
Location: Silicon Valley Vortex
Contact:

Re: Getting started - Partial success - what next?

Postby sheepdoll » Wed May 27, 2015 5:30 pm

Roger, Madias;

Any work on detailing the use of serial on the Nucleo? I cut the traces on the STM link with the strap. Unclear as to which Serial port to use and if wires needed to be added between the pins on the Morpho header and the STM link module.

In the mega thread on Arduino.cc there is a lot of discussion on serial vs USBSerial, then what to do with Serial1, Serial2 and Serial3?

madias
Posts: 813
Joined: Mon Apr 27, 2015 11:26 am
Location: Vienna, Austria

Re: Getting started - Partial success - what next?

Postby madias » Wed May 27, 2015 8:05 pm

sheepdoll:
We are waiting that Roger will implement a solution to choose the (USB) serial port as variant defined "Serial", this is sadly a big deal, because it needs to change every "variant" folder (these are contaminated sites from the leaflabs side, as they use USBserial to a defined pin and you cannot change the order without changing the "core" code).
Meanwhile if you followed my little soldering manual you can use D22/PC10=TX and D30/PC11=RX as USB-Serial debugger. But you have to choose "Serial2" for them.
In my pinsheet viewtopic.php?f=29&t=93 there are the "should be" definitions for the serial port numbers, how I will implement them, when Roger is ready!

I wrote a little test code to check out all serial ports (the LED is blinking, so you know that the code is working)

Code: Select all

#define ledpin 13
boolean flip=0;
void setup() {

  Serial.begin(9600);
 Serial1.begin(9600);
 Serial2.begin(9600);

 pinMode(ledpin,OUTPUT);
}

void loop() {
flip=!flip;
digitalWrite(ledpin,flip);
  Serial.println("Port: Serial0");
  delay(100);
 
 Serial1.println("Port: Serial1");
  delay(100);
 Serial2.println("Port: Serial2");
  delay(100);        // delay in between reads for stability
}

User avatar
Rick Kimball
Posts: 776
Joined: Tue Apr 28, 2015 1:26 am
Location: Eastern NC, US
Contact:

Re: Getting started - Partial success - what next?

Postby Rick Kimball » Wed May 27, 2015 8:55 pm

All the Nucleo boards I have (a couple of STM32F0 boards) you can just use the Nucleo Virtual port and it is wired to one of the USART TX/RX pairs. I just looked at the NUCLEO-F103RB documents, it seems that is also done that way. Why are you soldering / desoldering anything? Just use USART code to talk out the NUCLEO Virtual COM port.

-rick
Last edited by Rick Kimball on Thu May 28, 2015 7:02 pm, edited 1 time in total.
-rick


Return to “STM Nucleo boards”

Who is online

Users browsing this forum: No registered users and 2 guests