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:

it鈥檚 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:





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.
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]
@rspelta @MarceloSalazar I was able to track down part of this issue. Could you take a look at #5489 for me?
[Mirrored to Jira]
@MarceloSalazar Fyi, we removed the IOTMORF-2318 comment to make sure the issue script doesn't do weird things.
[Mirrored to Jira]
Internal Jira reference: https://jira.arm.com/browse/IOTCORE-244
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.
@VVESTM How did you test it? The online exporters have not been updated yet. We test IAR _building_.
@theotherjimmy , I clone mbed-os on my laptop, then, I use this command :
mbed export --ide uvision6 --target DISCO_F746NG
or --ide IAR
@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.
@theotherjimmy, forgot to mention this, sorry. I also added a main.cpp in mbed-os root directory. (only an hello world...)
Thanks for clarifying. Are you using master branch?
yes, I am on master branch. We can continue by private mail if needed in order not to pollute this thread.
@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?
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.
Do you get the error message in step 4?
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)
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: