-
Notifications
You must be signed in to change notification settings - Fork 16
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
IAR support #2
Comments
Roland Stahn mentionson the Trello card that he have added some example IAR Linker MAP files to this issue in the Jenkins JIRA: https://issues.jenkins-ci.org/browse/JENKINS-19840 |
See also the relevant comments and supplied examples from Roland Stahn in JENKINS-19840 (which is now closed as we only use GHI going forward). |
HI, i would like to make this, actually is have started already. https://github.com/kvdz/memory-map-plugin look for each for ".text", ".noinit", ".bss"and ".data"?
specially the Grand Total: ..... line. The numbers are an example how much flash is used for code and data, same counts for RAM use |
Hi @kvdz Great, we're happy to take in contributions and supply you with some answers etc. Regarding your question above we would prefer if find the different .text, .bss etc so they can be used for making graphs. You need to implement a new parser in For testing you should supply as minimum some example output file you can use in testing, so maybe from a non proprietary example? Please note that to get your changes release you should make the pull request on this repository, not the jenkins-ci your fork i based on. But that is simply a matter of some git gymnastics. Let's keep in touch on this issue. |
The reason i am asking is because i am not confident that it will work for IAR map file. you could have 2 programs (bootloader, main program) bootloader can ben in the upper space of in the lowest space of the flash. The main program and the bootloader can have the same vector table or have different onces. also the output from the IAR compiler (map file) is set up that it is grouped by sections of flash. into absolute sections and relative sections and what this sections contains. i don't see any of this in the TI of gcc test map file. By TI and gcc they are grouped by memory type. |
example some parts are removed: *** PLACEMENT SUMMARY "A1": place at 0x10001fe0 { section .noinit }; Section Kind Address Size Object "A2": 0xc0 "P2": 0x4 "A3": 0x10 "P1": 0x622c Absolute sections, part 1 of 34: 0x4 "P3", part 1 of 3: 0x12c "P3", part 2 of 3: 0x450
"P3", part 3 of 3: 0x800 |
Nice to read about progress on this feature! I am happy to provide even more map files to be tested: EWARM_MAP2.ZIP I also added the associated linker configuration file for each map file, since I just learned that the memory map plugin evaluates this as well. My examples include three different STM32 devices (STM32F0, STM32L1, STM32L1-X). Especially the STM32L1-X is interesting, as its memory layout contains two flash banks (192kB each) with a gap in between! Is the new IAR parser already able to evaluate the linker config files? |
BTW, since this issue is called "IAR support". I think we need to differentiate between the various editions of IAR compilers for different platforms. Most users are probably interested in parsing map files for the widespread ARM MCUs. This is what IAR calls "EWARM" (Embedded Workbench for ARM). As we already learned from my example files, linker output is different for other IAR compilers (STM8, AVR, etc.). I would like to suggest to concentrate on EWARM support first. |
@rstahn i agree on seperation of the issue into IAR EWARM/ IAR AVR/ IAR STM8. the only tested versions with this parser is a LPC 11xx, 17xx using IAR V6.4.4 so newer versions are welcome. but i don't have the rights to change issues here. i will test the zip you posted here to see if there is room for improvements. |
@rstahn The most parts like .bss, .rodata, .text, .data and .noinit are all good on any version (V7.60.1 and V8.20.1). only i saw something on |
Apparently, it is a special section for "DLIB multi-threaded support": I could find only limited documentation on this section within the IAR manuals:
From the address in the MAP file I can conclude, that it is placed into RAM. But I can only guess, that this is always the case. |
@rstahn oke thank you. |
@buep how does the configuration works? to me it looks really messy and not really readable. What should it do in these functions:"parseConfigFile, parseMapFile" ? |
@rstahn i have added all ARM AVR and STM8 memory sections so no rename needed on tickets. |
Thats great! Thank you. |
Really looking forward to IAR support for the Memory map plugin, is there anything that I can do to help the merging of PR #43 ? Is it easy to create an .hpi for the branch that we can test the plugin with IAR support? |
Hey folks, Sorry if things have been quiet from our side. We've had a hectic spring and now everyone's buggered off for summer holidays. 🌴 I'll see if I can help you out and get the ball rolling for when @MadsNielsen gets back from holiday. I'll look into @kvdz's changes and questions, and setting up a HPI build for the PR. Expect some info soon. ✌️ |
I pulled down @kvdz's changes, rebased them onto The project still uses Maven, so to build an HPI you can run |
As for the details regarding the parsing methods, I only have a vague idea. I'll take a shot at explaining them anyway, but take what I say with a grain of salt. I can do Java, but memory maps aren't really my thing. 😉 From what I understand that's where the RegEx are actually used to build up a list of The The For example, the Hope this makes a shred of sense. 🙂 |
Any progress regarding this topic? |
Is there anyone that has this plugin (with IAR support) working in a pipeline and can provide a demo snippet, I'm not sure how to use it. But I'm still very much open into testing it, we have a lot of different IAR versions and platforms. Currently trying to integrate it into a I created a hpi and installed it on our Jenkins, but I can't seem to figure out how to use it correctly from a pipeline, keep getting |
Since yesterday, I'm stuck at the same problem: |
I tried both the |
Hey everyone, We're looking at fixing and merging in the pull request, then making a formal release that supports IAR. To help with that, we could really use some more IAR files to write tests against, as we currently have no way of verifying if the parser's working. 😕 Would it be possible to provide some test files you'd like being able to parse using the plugin? If possible, specify which version of IAR you're using as well. Even the output from hello world projects would be greatly appreciated. Thanks! |
Great! 👍 Below some example map files (as .txt). If you need more examples I'm happy to provide them, but you can also download IAR for a specific architecture and on the start page go to the Information center and download example projects. EWSTM8 2.20EWARM 7.40EWARM 7.80.4EW8051 9.20.1 |
Glad to hear, that you're on fixing it. I attached some map files (as .txt, as .map is not supported to upload). |
I can generate more map files if you need them. I am very interesting in this feature and the plugin in general. When is this feature planned to release? I can also contribute with unit-tests or parser implementation. |
This is the next issue I will work on. I hope to get to it within two weeks. |
The current implementation on the |
Below some linker files as text files (remove the .txt). Note that the 8051 linker files have a |
I can provide additional linker configuration and map files for EWARM 7.60.1:
I did also check the linker files for EWARM 8.22.3 - they are similar to EWARM 7.60.1. It looks like there were no changes to the ICF file format with the latest major version. |
I can also provide some additional ICF files for larger MCU's with multiple SRAM and FLASH banks:
I do not have a map file at hand for these MCU's though. |
Here is another interesting special case: This controller features 384kB of FLASH memory in two banks with a "gap" in address space between the banks. Bank 1 covers 0x08000000 - 0x0802FFFF and Bank 2 covers 0x08030000 - 0x0805FFFF. The address range 0x08030000 - 0x0803FFFF inbetween has no flash memory. |
@OEHC Is there a branch in a fork we can try out, even if it is not finished yet? Would love to help in testing it. If there is anything else you need, please let me know. |
The relevant changes should be on the iar-pr-1 branch. I'm planning on picking this up again on Friday, as Oliver went on leave to finish his thesis. I believe I was adding some tests when I last left off, though I seem to have done an excellent job of actually pushing my changes. 😓 Regardless, I'll see if I can get those tests up and running and share some more detailed notes here. |
@praqma-thi Thanks for the update! Let me know if I can contribute in any way. Really appreciating the work 👍 |
Fruitful afternoon digging through old Java code, I must say. The current IAR parser is a placeholder copy of the Texas Instrument parser. Before jumping into writing the IAR parser, I tried to figure out how implementations of AbstractMemoryMapParser actually work. I did this mostly by taking a look at the existing Texas Instruments parser implementation. This turned out to be a poor decision, as the TI parser only works because of pure luck. When you configure your graph to record, for example, Looking through the code and running a few tests, I've concluded that it always uses the default pattern, which luckily works for both Gcc and Texas Instruments, and that the other fancy patterns and Java code in those parsers is effectively pointless. After a long exhale, I decided to keep things simple in the IAR parser, simplify the whole "which pattern to use for which section" to a simple map. e.g.: Map<String, String> sectionPatterns = [
".text": "\\.text\\s+\\S+\\s+\\S+\\s+\\S+\\s+(\\S+)",
".intvec": "\\.intvec\\s+(const|ro\\scode)\\s+\\S+\\s+(\\S+)",
...
] And then have the That approach doesn't cover different versions of the compiler yet (EWARM, STM8, AVR). Either we can try detecting the right version and use the appropriate patterns, or a second drop-down to pick the version could work as well. Regardless, I'll let this simmer over the weekend, and get down to implementing this either Thursday or Friday. |
Pushed some WIP changes to the |
I was plagued by a weird runtime error, where Jenkins complains the So now the parser finds and parses entries, but results don't match expectations. So parsing
Regardless, it's progress. More to follow. |
Hello @praqma-thi , any update on IAR ARM (EWARM) support readiness for this plugin? |
Progress is slow, as I can only rarely chip away at it. I'll see if we can somehow address this, either by reviving Praqma's open source department or putting the plugin up for adoption. Some progress notes: It still doesn't return the correct values (now returning the value of the last entry, rather than the sum of all), which'll require a little more digging. |
Support for IAR compilers
Trello card from old roadmap with a few more details that can be useful.
The text was updated successfully, but these errors were encountered: