EmbeddedRelated.com
Forums
Memfault Beyond the Launch

LPCXpresso Build Automate

Started by Shashank Maheshwari March 21, 2014
Il 23/03/2014 01:15, Phil Young ha scritto:
>
>
> I do this already using the internal serial number, and run a script
> after programming to retrieve the serial number of the device.
>
>
>
> To simplify it the start of my code retrieves the serial number into a
> global array, from which I generate several other numbers, then I
> start the code in the debugger with a breakpoint just after the serial
> numbers are generated and run the script to dump them to the console.
>
>
>
> This takes a few seconds per board to program, enter the debugger, and
> retrieve the values.
>
>
>
> I posted the code earlier to retrieve the serial number.
>
Using ISP commands and a programming sw supporting it (there are
several) you should be able to do everything without the effort to copy
the UID in a global array. In the application is not a good idea to have
a global array containing the UID if the UID is used to generate AES or
other types of encrypted/secret key because the security of the
generated keys is dependent by the UID and the generator algorithm of
course. So, you should access the UID using IAP commands as shortly as
possible, in this way the UID will stay (shortly) on the stack. If you
need more security you could write a function where you read the UID
inside an inner block and after that in the outside block you could
write the stack location just used to temporary store the UID. This
could be important when you use the external memory bus.
>
>
>
> Regards
>
>
>
> Phil.
>
>
>
>
>
> *From:*l... [mailto:l...] *On
> Behalf Of *Mario Ivancic
> *Sent:* 22 March 2014 19:52
> *To:* l...
> *Subject:* Re: [lpc2000] LPCXpresso Build Automate
>
>
>
>
>
> On 21.3.2014 7:44, Shashank Maheshwari wrote:
>
> Hi Guys
>
>
>
> I have been working on LPC1114 using LPCXpresso on a Mavericks. I
> needed to create a same firmware thousand times with different
> embedded serial numbers and get the respective hex.
>
>
>
> Can someone help out with automating this process. I guess writing
> a shell script or something with change in the serial number
> through vi editor and building the project with saving the hex
> every time can solve the issue. However even after multiple tries
> I was not successful in this.
>
>
>
> I would really appreciate any help or pointers in this.
>
>
>
> Hello,
> I'm using make utility and Makefile for flashing my boards. Another
> key componet is lpc21isp because it accepts two (or more) hex files.
> First hex file is firmware which have placeholder for serial number on
> known location. Second hex file is automaticaly generated by custom
> utility program and contains only serial number.
> So, when I run Makefile it execute this tasks:
> - new hex file with serial number is autogenerated
> - lpc21isp do the flashing
> - custom program prints serial number and other stuff on bar code label
>
> I hope this can give you some ideas.
> Best regards
> Mario
>
>
>
>
>
> Questa e-mail è priva di virus e malware perché è attiva la protezione
> avast! Antivirus .

logo
*

Massimo Manca*/, Micron Engineering/
via della Ferriera, 48 33170 Pordenone PN ITALIA
Tel: 39 0434 1856131| Mobile: 39 349 4504979
www.micronengineering.it

Twitter

LinkedIn

SlideShare

Contact me: Skype micron.engineering
Designed with WiseStamp -
Get
yours

---
Questa e-mail è priva di virus e malware perché è attiva la protezione avast! Antivirus.
http://www.avast.com
[Non-text portions of this message have been removed]



An Engineer's Guide to the LPC2100 Series

I Think you missed the point here(actually several points ).

1. There is no external memory bus on the LPC1114.

2. The UID is stored in internal ROM on the LPC1114 and can be accessed directly without API calls including using the debugger to read the memory directly, it’ just more portable using the IAP.

3. For secure applications the only solution with LPC1114 is to disable debug access after programming the release code.

But if you use the UID for other purposes simply using the IAP to RAM makes it easier to access without repeated calls to the IAP, particularly if you need to access this in critical code and can’t afford the overhead of IAP calls.

In this case moving the UID to a global array is a very good idea!.

Cheers

Phil.

From: l... [mailto:l...] On Behalf Of M. Manca
Sent: 26 March 2014 09:34
To: l...
Subject: Re: [lpc2000] LPCXpresso Build Automate

Il 23/03/2014 01:15, Phil Young ha scritto:
> I do this already using the internal serial number, and run a script
> after programming to retrieve the serial number of the device.
>
> To simplify it the start of my code retrieves the serial number into a
> global array, from which I generate several other numbers, then I
> start the code in the debugger with a breakpoint just after the serial
> numbers are generated and run the script to dump them to the console.
>
> This takes a few seconds per board to program, enter the debugger, and
> retrieve the values.
>
> I posted the code earlier to retrieve the serial number.
>
Using ISP commands and a programming sw supporting it (there are
several) you should be able to do everything without the effort to copy
the UID in a global array. In the application is not a good idea to have
a global array containing the UID if the UID is used to generate AES or
other types of encrypted/secret key because the security of the
generated keys is dependent by the UID and the generator algorithm of
course. So, you should access the UID using IAP commands as shortly as
possible, in this way the UID will stay (shortly) on the stack. If you
need more security you could write a function where you read the UID
inside an inner block and after that in the outside block you could
write the stack location just used to temporary store the UID. This
could be important when you use the external memory bus.
>
> Regards
>
> Phil.
>
> *From:*l... [mailto:l...] *On
> Behalf Of *Mario Ivancic
> *Sent:* 22 March 2014 19:52
> *To:* l...
> *Subject:* Re: [lpc2000] LPCXpresso Build Automate
>
> On 21.3.2014 7:44, Shashank Maheshwari wrote:
>
> Hi Guys
>
> I have been working on LPC1114 using LPCXpresso on a Mavericks. I
> needed to create a same firmware thousand times with different
> embedded serial numbers and get the respective hex.
>
> Can someone help out with automating this process. I guess writing
> a shell script or something with change in the serial number
> through vi editor and building the project with saving the hex
> every time can solve the issue. However even after multiple tries
> I was not successful in this.
>
> I would really appreciate any help or pointers in this.
>
> Hello,
> I'm using make utility and Makefile for flashing my boards. Another
> key componet is lpc21isp because it accepts two (or more) hex files.
> First hex file is firmware which have placeholder for serial number on
> known location. Second hex file is automaticaly generated by custom
> utility program and contains only serial number.
> So, when I run Makefile it execute this tasks:
> - new hex file with serial number is autogenerated
> - lpc21isp do the flashing
> - custom program prints serial number and other stuff on bar code label
>
> I hope this can give you some ideas.
> Best regards
> Mario
> ----------------------
> Questa e-mail è priva di virus e malware perché è attiva la protezione
> avast! Antivirus .

logo
*

Massimo Manca*/, Micron Engineering/
via della Ferriera, 48 33170 Pordenone PN ITALIA
Tel: 39 0434 1856131| Mobile: 39 349 4504979
www.micronengineering.it

Twitter

LinkedIn

SlideShare

Contact me: Skype micron.engineering
Designed with WiseStamp -
Get
yours


---
Questa e-mail è priva di virus e malware perché è attiva la protezione avast! Antivirus.
http://www.avast.com

[Non-text portions of this message have been removed]

Memfault Beyond the Launch