Writing data to flash - from bin file

I would like to store a look-up-table in a page of flash. My intention is to flash this in during production, so I have added it to the appropriate memory section of the bin file, which I then flash in using ST-Link.

However, when my code interprets the values they have been converted to ASCII. eg if I store a 0, my code reads it as 0x30.

Does anyone have any suggestions for storing the data in a correct hex format?

Try to open your file with Notepad++ (freeware) or windows editor (notepad.exe). If you see clear text data then you have a hex file and not a bin file.If you see a lot of garbage and only few readable text then you have a bin file.

If you have a hex file (readable text) then you need only to say to load as hex file. in this case you need to rename the file to extension .hex then st-link knows how to manage that.

Why your compiler/assembler creates a bin file with hex-file data, I cant see with the information you post here but I'm sure there is only a small wrong configuration.