Praqma / memory-map-plugin

A repository for the memory-map-plugin
13 stars 16 forks source link

Add IAR parser #36

Closed kvdz closed 6 years ago

kvdz commented 7 years ago

Add iar parser. Regular expression are testen and good. It is a copy of IT parser

https://github.com/Praqma/memory-map-plugin/issues/2

OEHC commented 6 years ago

I have looked through the code, and executed the different regexps on the example files from Roland Stahn, which can be found here. In the file EW_AVR_6_60_1_ATmega.map nothing is matched with the regexps. I guess this is intentional since it's AVR and not ARM. In the file EW_ARM_6_50_6_Cortex_M3_error.map, the wrong parts are matched, since the section placement failed. This results in some addresses missing, and therefore the regexps skips the data it needs to grap.

buep commented 6 years ago

I think we need more testing and further fixes then before taking this into next release.

kvdz commented 6 years ago

oh oke. thanks for the testing. i have test it with the ARM cortex M0 map file. I will look at the other 2 map files. but it think ARM and AVR can not be in the same parser..

kvdz commented 6 years ago

@OEHC how should the plugin react to failed placement? should it be excluded? i think the feature of showing memory sizes has nothing todo with compiler error/warnings like failed placement.

kvdz commented 6 years ago

@OEHC i have checked the regex with https://regexr.com/ in combination with the EW_ARM_6_50_6_Cortex_M3_error.map and all the sections needed to match are matched (total 142)

rstahn commented 6 years ago

I have added more example test files at Issue #2. These examples also include linker configuration files, which might be worth testing as well.

rstahn commented 6 years ago

Regarding this pull request I would like to suggest to rename the parser to "IAR EWARM", since the current code does handle the ARM edition of the IAR compiler only (see #2 ). This way support for other IAR compiler editions could be added as additional parser-implementations later (if reasonable).

kvdz commented 6 years ago

close pull request not ready