Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export: uvision5 + STM32 does not flash #5467

Closed
rspelta opened this issue Nov 9, 2017 · 16 comments

Comments

Projects
None yet
8 participants
@rspelta
Copy link

commented Nov 9, 2017

Description

  • Type: Bug
  • Targets "tested": NUCLEO_L476ZI, SILICA_SENSOR_NODE
  • IDE used: uVision 5.24
  • Project: mbed-os-example-blinky (lastest version)

Marcelo has asked to me to open this issue.
cc: @MarceloSalazar

Issue:
When I export the project (mbed-os-example-blinky) for uVision5 and I try to debug it, I get this error:

image006

it’s something to do with the flash algorithm not being set correctly. It seems that the project is exported wrongly.

My temporary solution:
I find out a workaround setting manually the project. Here my steps:

  1. mbed import https://github.com/ARMmbed/mbed-os-example-blinky
  2. mbed export -i uvision5 -m SILICA_SENSOR_NODE
  3. open the project and if needed download the libreries required
  4. Even if you have this error, ignore it
    1
  5. go to "Project -> Options for the target 'mbed-os-example-blinky'"
  6. Click on "Debug" tab
    2
  7. Click on "Settings" button, it is near "Use: ST-Link Debugger"
  8. Select "Connect: with pre-reset" (at the bottom of the form, in "Connect & Reset Options")
    3
  9. Click on "Flash download" tab
  10. Click on "add" button
    4
  11. Select "STML4xx 1MB Flash", it is the algorithm. Now it is setted correctly!
    5

Side note: When I open the project in uvision, it complains about a missing device pack for STM32L4 even though it HAS been installed. Even if you try and re-install the pack completely, it still complains every time you open the project. About this issue seems you already know this problem and it will be fixed in the next release.

@theotherjimmy

This comment has been minimized.

Copy link
Contributor

commented Nov 9, 2017

Thanks for the detailed description of the workaround! I'll take a look at this in the coming days. I may not have time this week, but you should certainly hear from me sometime next week.
[Mirrored to Jira]

@theotherjimmy

This comment has been minimized.

Copy link
Contributor

commented Nov 13, 2017

@rspelta @MarceloSalazar I was able to track down part of this issue. Could you take a look at #5489 for me?
[Mirrored to Jira]

@theotherjimmy theotherjimmy changed the title mbed export not working with uvision5 Export: uvision5 + STM32 does not flash Nov 14, 2017

@ciarmcom ciarmcom added the mirrored label Jun 1, 2018

@ARMmbed ARMmbed deleted a comment from MarceloSalazar Jul 9, 2018

@cmonr

This comment has been minimized.

Copy link
Contributor

commented Jul 9, 2018

@MarceloSalazar Fyi, we removed the IOTMORF-2318 comment to make sure the issue script doesn't do weird things.
[Mirrored to Jira]

@ARMmbed ARMmbed deleted a comment from ciarmcom Oct 2, 2018

@adbridge

This comment has been minimized.

Copy link
Contributor

commented Oct 4, 2018

Internal Jira reference: https://jira.arm.com/browse/IOTCORE-244

@VVESTM

This comment has been minimized.

Copy link
Contributor

commented Mar 19, 2019

Hi,
For information, the problem is still present. I try to work on Disco F746 and I am not able to flash the SW with Keil. (The proposed workaround is working fine).
By the way, I have also problems to export to IAR... Do you have any tests on export feature ?
Regards.

@theotherjimmy

This comment has been minimized.

Copy link
Contributor

commented Mar 19, 2019

@VVESTM How did you test it? The online exporters have not been updated yet. We test IAR building.

@VVESTM

This comment has been minimized.

Copy link
Contributor

commented Mar 19, 2019

@theotherjimmy , I clone mbed-os on my laptop, then, I use this command :
mbed export --ide uvision6 --target DISCO_F746NG
or --ide IAR

@theotherjimmy

This comment has been minimized.

Copy link
Contributor

commented Mar 19, 2019

@VVESTM The exporters don't support exporting just Mbed OS. Be sure to include a project with a main.cpp or main.c as well.

@VVESTM

This comment has been minimized.

Copy link
Contributor

commented Mar 19, 2019

@theotherjimmy, forgot to mention this, sorry. I also added a main.cpp in mbed-os root directory. (only an hello world...)

@theotherjimmy

This comment has been minimized.

Copy link
Contributor

commented Mar 19, 2019

Thanks for clarifying. Are you using master branch?

@VVESTM

This comment has been minimized.

Copy link
Contributor

commented Mar 19, 2019

yes, I am on master branch. We can continue by private mail if needed in order not to pollute this thread.

@theotherjimmy

This comment has been minimized.

Copy link
Contributor

commented Mar 19, 2019

@VVESTM This is about as on topic as it gets. Let's keep this discussion public. What's the error message that you're seeing?

@VVESTM

This comment has been minimized.

Copy link
Contributor

commented Mar 19, 2019

OK, so, I am on master branch and I added a main.cpp file. I have also mbed_setting.py to have toolchain paths.
I export the project to Keil with this command :
mbed export --ide uvision6 --target DISCO_F746NG
Then, I open the .uvprojx project with Keil. Compilation is OK.
When trying to debug the source code, I have a popup with this message :
Error: Flash Download failed - "Cortex-M7"

If I apply @rspelta workarround, I am able to debug.

@theotherjimmy

This comment has been minimized.

Copy link
Contributor

commented Mar 19, 2019

Do you get the error message in step 4?

@VVESTM

This comment has been minimized.

Copy link
Contributor

commented Mar 20, 2019

No, I can open the project file and compile it without error. Problem occurs when I want to start the debugger (or flash the board)

@bridadan

This comment has been minimized.

Copy link
Contributor

commented Mar 25, 2019

I believe this comes from an issue in the current device index. The current device index does not mark any flash algorithm as "default", so no flash algorithm is set in the exported projects.

I believe the following changes would need to happen to fix this:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.