Skip to content

[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

Merged
merged 3 commits into from
Feb 13, 2017

Conversation

ccli8
Copy link
Contributor

@ccli8 ccli8 commented Jan 16, 2017

Description

This PR includes support for exporting IAR project and other bugfixes for NUMAKER_PFM_NUC472 and NUMAKER_PFM_M453 targets.

Copy link
Contributor

@0xc0170 0xc0170 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM

@bridadan
Copy link
Contributor

retest uvisor

/morph export-build

@bridadan
Copy link
Contributor

/morph test

Copy link
Contributor

@theotherjimmy theotherjimmy left a 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.

@bridadan
Copy link
Contributor

/morph export-build

@bridadan
Copy link
Contributor

/morph test

@mbed-bot
Copy link

Result: FAILURE

Your command has finished executing! Here's what you wrote!

/morph export-build

Output

mbed Build Number: 85

Exporter Build failed!

@mbed-bot
Copy link

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 1417

All builds and test passed!

@bridadan
Copy link
Contributor

bridadan commented Jan 17, 2017

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?

@bridadan
Copy link
Contributor

This should fix #3417 if we can get IAR exporting working!

@ccli8
Copy link
Contributor Author

ccli8 commented Jan 18, 2017

@bridadan I test with IAR 7.3. I'll try IAR 7.8.

@ccli8
Copy link
Contributor Author

ccli8 commented Jan 18, 2017

@bridadan After upgrade to IAR EWARM 7.80, the export function is still OK for both NUMAKER_PFM_NUC472 and NUMAKER_PFM_M453 targets.

CCLi8@OANBE02023 MINGW32 /c/ccli8/iot/mbed/mbed-os/mbed-os-example-blinky (master)
$ mbed export -i iar -m NUMAKER_PFM_NUC472
c:\python27\lib\site-packages\fuzzywuzzy\fuzz.py:35: UserWarning: Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning
  warnings.warn('Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning')
Scan: .
Scan: FEATURE_BLE
Scan: FEATURE_COMMON_PAL
Scan: FEATURE_LWIP
Scan: FEATURE_UVISOR
Scan: FEATURE_ETHERNET_HOST
Scan: FEATURE_LOWPAN_BORDER_ROUTER
Scan: FEATURE_LOWPAN_HOST
Scan: FEATURE_LOWPAN_ROUTER
Scan: FEATURE_NANOSTACK
Scan: FEATURE_NANOSTACK_FULL
Scan: FEATURE_THREAD_BORDER_ROUTER
Scan: FEATURE_THREAD_END_DEVICE
Scan: FEATURE_THREAD_ROUTER
Scan: FEATURE_STORAGE

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.

@bridadan
Copy link
Contributor

@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.

@ccli8
Copy link
Contributor Author

ccli8 commented Jan 19, 2017

@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?

@theotherjimmy
Copy link
Contributor

@ccli8 What fix do you need from the IAR exporter for debugging?

@0xc0170
Copy link
Contributor

0xc0170 commented Jan 19, 2017

@ccli8 What fix do you need from the IAR exporter for debugging?

I believe it is debugger driver. Is that correct @ccli8 ? When is this driver becoming part of IAR ?

@theotherjimmy
Copy link
Contributor

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.

Copy link
Contributor

@bridadan bridadan left a 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)"
Copy link
Contributor

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"

Copy link
Contributor Author

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)"
Copy link
Contributor

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"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bridadan same as above.

@theotherjimmy
Copy link
Contributor

The platform page on the developer site and the export page in the handbook.

@ccli8
Copy link
Contributor Author

ccli8 commented Jan 20, 2017

@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.

@ccli8
Copy link
Contributor Author

ccli8 commented Jan 20, 2017

@theotherjimmy @0xc0170

Copy link
Contributor

@bridadan bridadan left a 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?

@theotherjimmy
Copy link
Contributor

However, is there anyway we can avoid the manual editing of the project file?

Do we need to do that? I was under the impression that we only needed to install a driver.

@bridadan
Copy link
Contributor

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 mbed export command.

@ccli8
Copy link
Contributor Author

ccli8 commented Jan 23, 2017

@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
Copy link
Contributor

@ccli8 I can confirm that it project builds ok without any manual modifications. Though there are a quite a few error messages that pop up when the project loaded. @ccli8 are they any plans to include the Nu-Link Driver in the upcoming releases of IAR?

@ccli8
Copy link
Contributor Author

ccli8 commented Jan 23, 2017

@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.

@bridadan
Copy link
Contributor

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.

@ccli8
Copy link
Contributor Author

ccli8 commented Jan 24, 2017

@bridadan where did you find such Nuvoton target? I find none of Nuvoton targets except I install Nu-Link Driver (IAR).

@0xc0170
Copy link
Contributor

0xc0170 commented Jan 27, 2017

@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.

@sg- @bridadan Any update? I would install the board requirements for CI, as it's not integrated within the tool.

@bridadan
Copy link
Contributor

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?

@0xc0170
Copy link
Contributor

0xc0170 commented Jan 30, 2017

@ccli8 What od you think, can you update IAR specific device name as proposed by @bridadan above? Does debugging work?

@bridadan
Copy link
Contributor

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:

iarerror

Any ideas @ccli8? I can confirm the file that's in that error box exists.

@ccli8
Copy link
Contributor Author

ccli8 commented Feb 2, 2017

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.

@ccli8
Copy link
Contributor Author

ccli8 commented Feb 2, 2017

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.

@ccli8
Copy link
Contributor Author

ccli8 commented Feb 6, 2017

@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
Copy link
Contributor

bridadan commented Feb 6, 2017

Ah that was the missing part, thanks @ccli8. I can now debug once I do the manual modifications of the Project file.

@0xc0170 If we're ok with having the user do the IAR driver installation and editing the project file then I'll go ahead and add the driver to all the CI machines.

@sg-
Copy link
Contributor

sg- commented Feb 9, 2017

@0xc0170 If we're ok with having the user do the IAR driver installation and editing the project file then I'll go ahead and add the driver to all the CI machines.

@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.

@bridadan
Copy link
Contributor

bridadan commented Feb 9, 2017

@sg- Sounds good, I'll get the CI machines equipped with the Nuvoton IAR Driver.

@bridadan
Copy link
Contributor

bridadan commented Feb 9, 2017

/morph export-build

Copy link
Contributor

@bridadan bridadan left a 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!

@sg- sg- merged commit d8151d7 into ARMmbed:master Feb 13, 2017
aisair pushed a commit to aisair/mbed that referenced this pull request Apr 30, 2024
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants