-
Notifications
You must be signed in to change notification settings - Fork 3k
LPC55S69: Add IAR and uvision exporter support #10068
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
LPC55S69: Add IAR and uvision exporter support #10068
Conversation
Depends on #9994 |
@Alonof @mottigondabi FYI |
@ARMmbed/mbed-os-maintainers can it be rc3? It will significantly help debugging Pelion client integration. |
@mmahadevan108, thank you for your changes. |
I tried it on my Windows machine and got this when trying to build the target: *** Using Compiler 'V6.10.1', folder: 'C:\Keil_v5\ARM\ARMCompiler6.10.1\Bin'
Build target 'mbed_app'
compiling ac_buffer.c...
armclang.exe: error: no such file or directory: 'target'
armclang.exe: error: no such file or directory: 'not'
armclang.exe: error: no such file or directory: 'found' Ran |
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.
Changes look fine to me!
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.
Changes look good. Sorry that my last CPM sync missed that device pack download. Could you comment on how uvision re-implements the same post-build script?
@mikisch81 You're missing the Device Family Pack. It should have prompted for install when you opened the project. |
5.12.0-rc3 label added, waiting for approvals |
@theotherjimmy . The Target section is not set correctly in the project generated by exporter. When I switch to a different device and come back to LPC55S69, then the target section gets updated with the right value: Can you take a look at the exporter code. |
"startup": false | ||
} | ||
}, | ||
"name": "LPC55S69JBD100:cm33_core0", |
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.
This was not generated by CPM. please use the definition from CPM
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.
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.
We can do this another way without manually editing the index. I'll have comments on how soon.
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.
I recommend:
diff --git a/tools/arm_pack_manager/index.json b/tools/arm_pack_manager/index.json
index 04099199fc..0e444f5400 100644
--- a/tools/arm_pack_manager/index.json
+++ b/tools/arm_pack_manager/index.json
@@ -157095,7 +157095,7 @@
"startup": false
}
},
- "name": "LPC55S69JBD100:cm33_core0",
+ "name": "LPC55S69JBD100",
"processor": {
"Asymmetric": {
"cm33_core0": {
@@ -462779,4 +462779,4 @@
"vendor": "Nordic Semiconductor:54"
},
"version": "0.2.0"
-}
\ No newline at end of file
+}
diff --git a/tools/export/cmsis/__init__.py b/tools/export/cmsis/__init__.py
index f4e4d94a18..0248c4f72e 100644
--- a/tools/export/cmsis/__init__.py
+++ b/tools/export/cmsis/__init__.py
@@ -51,10 +51,12 @@ class DeviceCMSIS():
try:
self.dfpu = target_info['processor']['Symmetric']['fpu']
except KeyError:
- cmsis_core = self.core.replace("F", "").replace("-", "")
- for proc in target_info['processor']['Asymmetric'].values():
+ cmsis_core = self.core.replace("F", "").replace("-", "").replace("E", "")
+ for core_name, proc in target_info['processor']['Asymmetric'].items():
if proc['core'] == cmsis_core:
self.dfpu = proc['fpu']
+ self.dname = '{}:{}'.format(self.dname, core_name)
+ break
self.debug, self.dvendor = self.vendor_debug(
target_info.get('vendor') or target_info['from_pack']['vendor']
)
I verified that this procudes the same LPC55S69JBD100:cm33_core0
string in the project file.
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.
Great thank you, I will update the name. Please help check the other issue with memory section.
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.
This change does not seem to be working
- self.dfpu = target_info['processor']['Asymmetric']['fpu']
+ cmsis_core = self.core.replace("F", "").replace("-", "").replace("E", "")
+ for core_name, proc in target_info['processor']['Asymmetric'].items():
+ if proc['core'] == cmsis_core:
+ self.dfpu = proc['fpu']
+ self.dname = '{}:{}'.format(self.dname, core_name)
+ break
+ print(self.dname)
PS C:\mbed-os-example-blinky> mbed export -i uvision6 -m LPC55S69_NS
[mbed] Working path "C:\mbed-os-example-blinky" (program)
Scan: mbed-os-example-blinky
LPC55S69JBD100
LPC55S69JBD100
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.
👍 Good catch, I was uisng the _S
variant. New patch below:
diff --git a/tools/arm_pack_manager/index.json b/tools/arm_pack_manager/index.json
index 04099199fc..0e444f5400 100644
--- a/tools/arm_pack_manager/index.json
+++ b/tools/arm_pack_manager/index.json
@@ -157095,7 +157095,7 @@
"startup": false
}
},
- "name": "LPC55S69JBD100:cm33_core0",
+ "name": "LPC55S69JBD100",
"processor": {
"Asymmetric": {
"cm33_core0": {
@@ -462779,4 +462779,4 @@
"vendor": "Nordic Semiconductor:54"
},
"version": "0.2.0"
-}
\ No newline at end of file
+}
diff --git a/tools/export/cmsis/__init__.py b/tools/export/cmsis/__init__.py
index f4e4d94a18..a4569122b5 100644
--- a/tools/export/cmsis/__init__.py
+++ b/tools/export/cmsis/__init__.py
@@ -51,10 +51,14 @@ class DeviceCMSIS():
try:
self.dfpu = target_info['processor']['Symmetric']['fpu']
except KeyError:
- cmsis_core = self.core.replace("F", "").replace("-", "")
- for proc in target_info['processor']['Asymmetric'].values():
+ # TODO: refactor this into a "base_core_for" function
+ cmsis_core = self.core.replace("F", "").replace("-", "").replace("E", "")
+ cmsis_core = cmsis_core.replace("NS", "")
+ for core_name, proc in target_info['processor']['Asymmetric'].items():
if proc['core'] == cmsis_core:
self.dfpu = proc['fpu']
+ self.dname = '{}:{}'.format(self.dname, core_name)
+ break
self.debug, self.dvendor = self.vendor_debug(
target_info.get('vendor') or target_info['from_pack']['vendor']
)
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.
Thanks this works. The Device Tab of the Project Options is set correctly. The Target Tab of the Properties is not correct.
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.
It's a start. I'll look into what it would take to set the Target Tab correctly.
Can you please clarify how the memories section is picked from index.json and populated into the uvision.tmpl file? |
@mmahadevan108 I'd have to look into that. I don't know off the top of my head. |
@mmahadevan108 I can't get |
You have to apply the patch from #9994 |
mbed export -i uvision6 -m LPC55S69_NS |
@mmahadevan108 I have rebased your branch on top of #9994, and I still can't get an export going. |
Got it working, Had to rebase onto master again. |
CI started |
Test run: FAILEDSummary: 1 of 13 test jobs failed Failed test jobs:
|
Signed-off-by: Mahesh Mahadevan <[email protected]>
License issue , @ARMmbed/mbed-os-test ^^ Once we fix this, test will be restarted |
Signed-off-by: Mahesh Mahadevan <[email protected]>
f733205
to
3da7c6f
Compare
@mmahadevan108 what's the latest push ? Will restart CI once confirmed this is ready |
It includes the below commit per suggestion from @theotherjimmy. |
@mikisch81 For the build issue, please pick a different device and then re-select the LPC55S69. This operation populates the right memory values. |
@0xc0170 . This PR is ready |
CI started |
@mmahadevan108 |
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.
We're good to go now.
Here is the difference. The original project file has the below for CPU.
|
|
Test run: FAILEDSummary: 1 of 13 test jobs failed Failed test jobs:
|
No idea on the failure. Seems unrelated to this PR |
I reported this to @ARMmbed/mbed-os-test . Will restart exporters |
unexplained error (possibly license issue) |
Exporter job restarted. |
CI failures still seem incredibly suspicious. Restarting CI completely. |
Test run: FAILEDSummary: 1 of 13 test jobs failed Failed test jobs:
|
I restarted exporters the very last time (license server issue) |
Description
Add IAR and uvision exporter support for LPC55S69
Pull request type
Reviewers
@orenc17 @theotherjimmy @mikisch81 @maclobdell