Done: Import Hex File

Wishlists for new functionality and features.
Post Reply
arturv2000
Posts: 3
Joined: 17 Mar 2020 13:06

Done: Import Hex File

Post by arturv2000 »

Hi

Not sure if it is a BUG or a "Feature" of the program.

When importing an HEX File, i always get "Range Check Error". I believe this is because the Hex File contains data in address very high.

In this case, the HEX file was generated for an STM32 processor, where the Internal FLash address starts at 0x0800 0000, and also contains information to be programmed in an external FLASH memory, those contents start at 0x9000 0000.

When loading an Hex file that only contains the "internal Flash", no issues. But if the Hex file contains information about the "external Flash" will give the error.

Even when loading an Hex file with only the "External Flash" get the error.

Seems that the software as some kind of limit of the highest address it can parse from the file.

Is there any workaround?

Another thing, this is more a suggestion. When importing the Hex File, the data shown in the program, should start at the first address that exist in the HEX File. In this situation where the first used address is always at 0x0800 0000 i need to perform a very long scroll.. or use the "Goto" function. This is more an annoying thing...

Thank You

Artur

Maël
Site Admin
Posts: 1297
Joined: 12 Mar 2005 14:15

Re: Import Hex File

Post by Maël »

If you could provide me with an example file, that would help a lot in debugging. You can send it to my email given here if you prefer for it to remain private: https://mh-nexus.de/en/contact.php

arturv2000
Posts: 3
Joined: 17 Mar 2020 13:06

Re: Import Hex File

Post by arturv2000 »

Hi

I have sent you an email with two files, one that is composed of "Internal Flash" + "External Flash" and the other one just the "External Flash".

Thank You

Maël
Site Admin
Posts: 1297
Joined: 12 Mar 2005 14:15

Re: Import Hex File

Post by Maël »

I replied to you by mail, to keep a log of what is to be done I'll paste it here as well:

Thanks for the example file. I could reproduce the error and the reason is due to the large "empty" leading portion that needs to be inserted.
As you correctly noticed, HxD currently fills it with zeros.

I have to introduce a notion of undefined data to handle this. And will add data folding like for the ram editor / process memory editor.

This will take while, since I have to adapt all the inaccessible section handling code everywhere, also for the exporter.
If I add this there should also be an option for overwriting or inserting undefined regions etc.

arturv2000
Posts: 3
Joined: 17 Mar 2020 13:06

Re: Import Hex File

Post by arturv2000 »

Hi

Thanks for the update.

Your suggestions seems good. One other option i was thinking was to define at the moment of Import an address range to be imported, but would be necessary that the software doesn't show everything starting at address '0', only in the address range defined.

Keep up the good work.

For now i have a workaround, made a small application that shows the first 512 bytes of the external memory section, was the area i was interested to see if i was adding the correct bytes to the start of the memory area.

Thank You

sapphiwen
Posts: 4
Joined: 28 Jan 2021 16:40

Re: Import Hex File

Post by sapphiwen »

Hi Maël,
I'm wondering if this issue is fixed or the feature of undefined memory ranges added?
It would definitely be nice to be able to edit S19/Intel hex files since so many microcontrollers use predefined memory locations for code and data, and the built binaries are often scattered in blocks. I'd be happy to help any way I can.

Maël
Site Admin
Posts: 1297
Joined: 12 Mar 2005 14:15

Re: Import Hex File

Post by Maël »

Yes, it's implemented in the current 2.5, which will be ready soon (still waiting for some translations).
This "small" feature required many internal changes, and was quite complex, even if the result is "minimal".
You can view the preliminary changelog ( https://mh-nexus.de/en/hxd/changelog25.php ) until the official release is made.

For now you can get it here (without setup):
German:
https://mh-nexus.de/downloads/HxD25Deu.zip
English:
https://mh-nexus.de/downloads/HxD25Enu.zip

Maël
Site Admin
Posts: 1297
Joined: 12 Mar 2005 14:15

Re: Import Hex File

Post by Maël »

So, did you try it? Does it work for you?

sapphiwen
Posts: 4
Joined: 28 Jan 2021 16:40

Foldable regions aligning with column offsets

Post by sapphiwen »

Hi Maël,

Thank you very much! Yes I tried it and it was able to read my intel hex files :D
Would it be possible to align the start of line not always on the leftmost column, but according to the address offset at the top? Sometimes my linker would skip 4 bytes and the next data segment would start at an odd offset, I need to keep reminding my self when a data segment like this happens, that the leftmost byte of the column is not at 0 offset but some odd address, and the rest of the line becomes more difficult to read. I attached a screenshot of what I mean. Suggestion is to start the line of data at the 08 offset location instead of aligned to the left.
Capture.PNG
Capture.PNG (26.68 KiB) Viewed 157 times

Maël
Site Admin
Posts: 1297
Joined: 12 Mar 2005 14:15

Re: Import Hex File

Post by Maël »

I split off the new feature request into another topic, because it goes beyond the initial request and I will close this one, once HxD 2.5 is released.
See here:
https://forum.mh-nexus.de/viewtopic.php?p=3557#p3557

Post Reply