NUCLEO-F767ZI Code builds ok, uploads, but doesn't seem run

Post here first, or if you can't find a relevant section!
Post Reply
exdes
Posts: 11
Joined: Fri May 07, 2021 6:16 pm

NUCLEO-F767ZI Code builds ok, uploads, but doesn't seem run

Post by exdes »

Greetings,
I have attempted to build a number of examples from the library 'AsyncWebServer_STM32' (https://github.com/khoih-prog/AsyncWebServer_STM32) for the NUCLEO-F767ZI. I followed instructions to the letter and code built successfully and uploaded fine, though there was no activity on either the serial or the LEDs. I did eventually comment out most code to set the on-board LEDs, and again nothing happened. It seems to me that the processor is not running. I did also attempt some simple non-ethernet related examples ans none of these worked either. I tried the 'STM32CubeProgrammer (SWD)' upload method, Mass Storage, and 'Export Compiled Binary' manually dropped into the Nucleo directory - all upload okay, but the app did not seem to run.

-------------------------------------------------------------------
STM32CubeProgrammer v2.7.0
-------------------------------------------------------------------

ST-LINK SN : 066AFF323239524257235534
ST-LINK FW : V2J35M26
Board : NUCLEO-F767ZI
Voltage : 3.25V
SWD freq : 4000 KHz
Connect mode: Under Reset
Reset mode : Hardware reset
Device ID : 0x451
Revision ID : Rev Z
Device name : STM32F76x/STM32F77x
Flash size : 2 MBytes
Device type : MCU
Device CPU : Cortex-M7

Memory Programming ...
Opening and parsing file: Async_AdvancedWebServer.ino.bin
File : Async_AdvancedWebServer.ino.bin
Size : 126600 Bytes
Address : 0x08000000

Erasing memory corresponding to segment 0:
Erasing internal memory sectors [0 3]
Download in Progress:

File download complete
Time elapsed during download operation: 00:00:02.275

RUNNING Program ...
Address: : 0x8000000
Application is running, Please Hold on...
Start operation achieved successfully

-------------------------------------------------------------------

As I am a newbie in the Arduino/STM32 combo, I am not sure what information to post. It seems I am probably missing something basic.

Any suggestions would much appreciated.
mlundin
Posts: 94
Joined: Wed Nov 04, 2020 1:20 pm
Answers: 6
Location: Sweden

Re: NUCLEO-F767ZI Code builds ok, uploads, but doesn't seem run

Post by mlundin »

We need to see the code of the simplest sketches you tested in order to say anything more to help. Also what is the board connected to ?

Usually we start with "Hello World" and "Blinky" and "Serial Echo" before trying advanced web server to make sure everything basic is set up.
exdes
Posts: 11
Joined: Fri May 07, 2021 6:16 pm

Re: NUCLEO-F767ZI Code builds ok, uploads, but doesn't seem run

Post by exdes »

The simplest sketch I used is the Blinky example:

Code: Select all

/*
  Blink

  Turns an LED on for one second, then off for one second, repeatedly.

  Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO
  it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to
  the correct LED pin independent of which board is used.
  If you want to know what pin the on-board LED is connected to on your Arduino
  model, check the Technical Specs of your board at:
  https://www.arduino.cc/en/Main/Products

  modified 8 May 2014
  by Scott Fitzgerald
  modified 2 Sep 2016
  by Arturo Guadalupi
  modified 8 Sep 2016
  by Colby Newman

  This example code is in the public domain.

  http://www.arduino.cc/en/Tutorial/Blink
*/

// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(LED_BLUE, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(LED_BLUE, HIGH);   	// turn the LED on (HIGH is the voltage level)
  delay(1000);                      // wait for a second
  digitalWrite(LED_BLUE, LOW);    	// turn the LED off by making the voltage LOW
  delay(1000);                      // wait for a second
}
I'm building on the Arduino IDE v1.8.13 on Linux Mint 19.3 Cinnamon, standard PC. The Nucleo board is straight out of the box - no jumpers changed or modifications.
mlundin
Posts: 94
Joined: Wed Nov 04, 2020 1:20 pm
Answers: 6
Location: Sweden

Re: NUCLEO-F767ZI Code builds ok, uploads, but doesn't seem run

Post by mlundin »

Should work, and the build settings for compiling the code ?
exdes
Posts: 11
Joined: Fri May 07, 2021 6:16 pm

Re: NUCLEO-F767ZI Code builds ok, uploads, but doesn't seem run

Post by exdes »

I assume these are the setting you are looking for? Please see the attached screenshot...

Screenshot from 2021-05-08 11-22-57.png
Screenshot from 2021-05-08 11-22-57.png (52.11 KiB) Viewed 3365 times
exdes
Posts: 11
Joined: Fri May 07, 2021 6:16 pm

Re: NUCLEO-F767ZI Code builds ok, uploads, but doesn't seem run

Post by exdes »

UPDATE - I did finally get the 'BLINKY' example working. I changed the 'Optomize' setting from 'Fastest (-03) with LTO' to 'Smallest (-Os default)'. Thank-you for looking at this issue!
mlundin
Posts: 94
Joined: Wed Nov 04, 2020 1:20 pm
Answers: 6
Location: Sweden

Re: NUCLEO-F767ZI Code builds ok, uploads, but doesn't seem run

Post by mlundin »

Yes, was about to comment on the LTO setting, I have never used it and there has been reports of issues with that setting.
Great you are moving now.
User avatar
fpiSTM
Posts: 1723
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: NUCLEO-F767ZI Code builds ok, uploads, but doesn't seem run

Post by fpiSTM »

I never advise to use LTO, it is provided "as it" if it works fine else... for F7 ICache and DCache are enabled by default but as there is no MPU region management this can failed on some code.
Post Reply

Return to “General discussion”