-
Notifications
You must be signed in to change notification settings - Fork 3k
[NUC472/M453] Export IAR project and other bugfixes #3590
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM
retest uvisor /morph export-build |
/morph test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tools changes look fine.
/morph export-build |
/morph test |
Result: FAILUREYour command has finished executing! Here's what you wrote!
Outputmbed Build Number: 85 Exporter Build failed! |
Result: SUCCESSYour command has finished executing! Here's what you wrote!
OutputAll builds and test passed! |
The IAR exporter failed for both the NUMAKER_PFM_M453 and the NUMAKER_PFM_NUC472. We use IAR version 7.8, what version are you using to test? |
This should fix #3417 if we can get IAR exporting working! |
@bridadan I test with IAR 7.3. I'll try IAR 7.8. |
@bridadan After upgrade to IAR EWARM 7.80, the export function is still OK for both NUMAKER_PFM_NUC472 and NUMAKER_PFM_M453 targets.
But to develop/debug with the exported IAR project, post-export configuration e.g. debugger driver is needed. It seems that the failure log has been deleted and I cannot see the details about the failure. |
@ccli8 The export function works just fine, it's when you try and build examples with IAR's build system (either via the command line or through the IDE) for that target where it fails. For the NUMAKER_PFM_M453 we are just testing https://github.com/ARMmbed/mbed-os-example-blinky. For the NUMAKER_PFM_NUC472, we are testing the following examples:
The way we test them is we import the example with mbed CLI, then we go to the mbed-os repo inside the project and pull in the fork that we're testing. You could do that for your fork to test your changes. |
@bridadan The exported IAR project needs fix for debugging. Please follow the Debug with IAR EWARM guide. Besides, could I build the exported IAR project by invocating scripts in mbed-os/tools? How to do that? |
@ccli8 What fix do you need from the IAR exporter for debugging? |
Oh, you mean that you need a third party driver to be installed to debug with IAR. I had originally read something that implied "The IAR exporter has to change". Sorry about that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ccli8 The export failure was caused by it failing to build because the field OGChipSelectEditMenu
was incorrect. I've detailed the changes I had to make below.
Also @theotherjimmy do we have a place where we document custom setup instructions for debuggers?
@@ -157,5 +157,11 @@ | |||
}, | |||
"NCS36510":{ | |||
"OGChipSelectEditMenu": "NCS36510\tONSemiconductor NCS36510" | |||
}, | |||
"NUC472HI8AE": { | |||
"OGChipSelectEditMenu": "NUC400AE series\tNuvoton NUC400AE series (NUC442AE,NUC472AE)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change this line to:
"OGChipSelectEditMenu": "NUC472JI8AE\tNuvoton NUC472JI8AE"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bridadan Please keep the OGChipSelectEditMenu
setting. Install Nu-Link Driver (IAR) first before building the exported IAR project. The change wouldn't fix the error still per my test.
"OGChipSelectEditMenu": "NUC400AE series\tNuvoton NUC400AE series (NUC442AE,NUC472AE)" | ||
}, | ||
"M453VG6AE": { | ||
"OGChipSelectEditMenu": "M451AE series\tNuvoton M451AE series (M451AE,M452AE,M453AE,M451MAE)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change this line to:
"OGChipSelectEditMenu": "M453VG6AE\tNuvoton M453VG6AE"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bridadan same as above.
The platform page on the developer site and the export page in the handbook. |
@bridadan I guess I know the failed point. Please install Nu-Link Driver (IAR) first to add these two targets' mcu information into your IAR's device database. It is necessary for both compiling and debugging. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ccli8 I owe you an apology! I should have carried out all of your instructions before requesting changes. Installing the Nu-Link Driver (IAR) did indeed fix the issue.
However, is there anyway we can avoid the manual editing of the project file? We can't really add this to the CI if we have to manually edit it. Any thoughts @theotherjimmy?
Do we need to do that? I was under the impression that we only needed to install a driver. |
According to the instructions here, the changes are necessary: https://github.com/OpenNuvoton/NuMaker-mbed-docs/blob/master/IAR/DEBUG_IAR.md#fix-debug-options-manually Also, the next section "Check configurations in IAR EWARM IDE" has more changes that aren't being set by default with the |
@bridadan @theotherjimmy Per my test on IAR EWARM 7.8, build is OK with just Nu-Link Driver (IAR) installed. Debugging support needs extra manual editing of the project file as above. Does your CI include debugging? |
@bridadan I can re-produce these errors. Currently, Nu-Link Driver is not scheduled to integrate into IAR and will still work as third-party plug-in. |
Thanks for the update @ccli8. I noticed that there is already a Nuvoton target that works in IAR without needing to install the Nu-Link driver. Is it still possible to debug with this target or are these changes necessary? @sg- Do we have a policy on boards that require external dependencies to be installed for exporters to work besides the IDE themselves? In this case the build fails unless the Nu-Link Driver is installed. If this is fine then I can just install it on all the CI machines. |
@bridadan where did you find such Nuvoton target? I find none of Nuvoton targets except I install Nu-Link Driver (IAR). |
@sg- @bridadan Any update? I would install the board requirements for CI, as it's not integrated within the tool. |
Sorry for my delayed response. The Nuvoton targets are definitely available in the IDE as of 7.8 (the version I'm using). I was able to find an old release note for version 7.6 and looks like the device is available there as well (NUC472JI8AE): http://supp.iar.com/FilesPublic/UPDINFO/011006/arm/doc/infocenter/device_support/Nuvoton.ENU.html#NUC400 I don't have a board with me now, but perhaps the debugging works without the need to install the Nu-Link driver in later versions? |
Hmm, so I've tried using the driver that is supplied by IAR and I've tried using the built-in target that's part of IAR 7.8. Both build ok, but I can't seem to get debugging working using the guide linked above. I keep getting this error: Any ideas @ccli8? I can confirm the file that's in that error box exists. |
Sorry for my late response @bridadan @0xc0170. Yes, Nuvoton device database is built into IAR 7.8 but Nu-Link debugger driver is not. The install/uninstall of Nu-Link Driver (IAR) will also overwrite/remove this built-in database, so I was confused and didn't find it at start. Anyway, debugging is not supported in clean IAR 7.8 without Nu-Link Driver (IAR) installed, and manual editing of the exported project file is necessary. Nuvoton's tool team is checking with IAR for integration of Nu-Link Driver (IAR) into IAR release. I will make necessary modification as soon as I have further information. |
For IAR debugging error @bridadan, have you switched the board to Debug mode from Mass mode ? Without such switch, I can re-produce the same error as you. |
@bridadan Do you get IAR debugging working now? Besides, IAR replied adding Nu-Link as built-in debugger is OK, but it requires upgrade from VS2008 to VS2015. Our tool team is estimating it and the work takes more than 2 months. |
@bridadan From what I've understood here that is what has to be done anyways to use Nuvoton boards / debuggers and IAR. Is this correct? If so, not ideal but CI updates and documentation on the exporter redirect page should be good enough. |
@sg- Sounds good, I'll get the CI machines equipped with the Nuvoton IAR Driver. |
/morph export-build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test results look good!
Ports for Upcoming Targets Fixes and Changes 3590: [NUC472/M453] Export IAR project and other bugfixes ARMmbed/mbed-os#3590 3740: STM32L4 HAL update for RTC Wake Up Timer ARMmbed/mbed-os#3740 3739: STM32F7 : remove multiple HSE_VALUE define value ARMmbed/mbed-os#3739 3759: STM32: spi_frequency table index fix ARMmbed/mbed-os#3759 3779: NCS36510: Fix the sporadic semaphore timing issue ARMmbed/mbed-os#3779 3806: NXP KL43Z/KL27Z: fix spi format bits check ARMmbed/mbed-os#3806 3814: NCS36510: I2C idle delay of 1us ARMmbed/mbed-os#3814 3803: Bug fix of initial value of interrupt edge in "gpio_irq_init" again ARMmbed/mbed-os#3803
Description
This PR includes support for exporting IAR project and other bugfixes for NUMAKER_PFM_NUC472 and NUMAKER_PFM_M453 targets.