|
![]() MCU User Forum
![]() Automatically assigning Serial Numbers
|
| next newest topic | next oldest topic |
| Author | Topic: Automatically assigning Serial Numbers |
|
jcb095 New Member |
I am using the C8051F320 micro and I would like to automatically assign each micro with a Serial number. What is the best way to accomplish this? Thanks in advance. IP: Logged |
|
ReneK Member |
This is what I do: I wrote a simple serial number genrator that fits my needs (it simply generates the number and writes it as serial number descriptor into an asm or c file). Production programming is done by a small script. This script I don't know if this is the best way, but it is good enough for me. IP: Logged |
|
jeremy Member |
Give your serial number an absolute location in code space (using the _at_ keyword), then after you program the micro, you can use the Flash Utils DLL to set your serial number. Alternatively, a serial number generator could generate a HEX file to program the serial number into the right place. IP: Logged |
|
Tsuneo Member |
- The code FLASH is erased to 'FF' in this MCU. And when the data written to it is 'FF', no write procedure is actually performed to that byte, it remains 'FF'. - "Flash program utilities" can 'overwrite' a range of the code FLASH without erasing other part. a) Fill the range to be replaced with 'FF' on the original firmware. // string descriptor for serial number: ABC12345 b) Locate the range on the code FLASH after linking it. - find its address on the linker map - confirm it with the IDE 'Tools' menu > 'Upload memory to file', after loading the firmware to the MCU. c) Using the "Flash program utilities", overwrite the address in the serial number. Anyway you need a 'serial number generator' program. Tsuneo IP: Logged |
|
frief Member |
Ideally someone would implement this for srecord: http://sf.net/projects/srecord/ or more specifically ![]() http://sourceforge.net/tracker/index.php?func=detail&aid=776221&group_id=72866&atid=535953 IP: Logged |
|
erikm Member |
why not include a Dallas DS2411? Erik IP: Logged |
|
stoyanmihaylov New Member |
Some time ago I and one my colegue did something similar. I made loader (using supplied DLLs), this loader had connection to MySQL. It did couple of things: 1. Connect to MySQL 2. Get bootloader.hex 3. Create and get unique.hex 4. Loads all code To have unique number, I am printing small labels with unique number which are something like 1a22w - and I am using barcodes also to automate whole proces. Meaning - I refuse to load code without unique number. And number is unique - MySQL can guarantee it. I used this technique to load unique key for criptography. IP: Logged |
|
Vulcan New Member |
I understand the concept of programming the device with 0xFF, then setting the serial number, but the link to the Flash Program Utilities is invalid. Have those tools been moved or renamed? Our manufacturing team likes to use the MCUProductionProgrammer. Is there any advice or example that I can use to have it create a serial number that is compatible with USB descriptors in the firmware library? Specifically Finally, I'm planning to move to a bootloader structure in order to upgrade firmware in the field. I would not want to reassign the serial number so it must reside in the bootloader space. Can I get any advice or direction on that? Thank you so much. IP: Logged |
|
vanmierlo Member |
Doesn't the Production Programmer already support generating Unicode serial numbers? I guess all you have to do is specify the address and program it. If you want it in the memory reserved for the bootloader then use such an address. In your application you can use a pointer to read that memory. IP: Logged |
All times are CT (US) | next newest topic | next oldest topic |
![]() |
|
Have you seen our MCU Knowledge Base?