Change USB descriptor-contents after firmware-compilation

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
RoKl_290166
Level 4
Level 4
Welcome!

Hi all,

   

does anybody know a way how can I change the contents of USB-descriptors after compilation in the .img-binary?

   

Can I determine the location of the descriptors in the .img-file by some linker-commands or something like that?

   

 

   

Thanks!

0 Likes
2 Replies
Anonymous
Not applicable

Do you want to change the serial number string with a batch file? In the iic files of the FX2 I did this simply by search and replace by a small c program. I think this is also possible with the img file. I tested this with an older SDK and the firmware was correctly downloaded and executed even if I did not adjust the checksum.

0 Likes
RoKl_290166
Level 4
Level 4
Welcome!

Hi Chris R.,

   

ok, that would be the rather 'dirty' variant.

   

But I have to change not only the serial number - descriptor but also a device-version or even a user-changeable descriptor where i don't know the previous content so wouldn't know for what I have to search.

   

 

   

Regards,

   

Robert

0 Likes