Author Topic: LPC11C14/301 Command Line Script  (Read 8629 times)

b_bann

  • Jr. Member
  • **
  • Posts: 7
    • View Profile
    • Email
LPC11C14/301 Command Line Script
« on: September 27, 2011, 07:26:42 am »
I can use FlashMagic V5.91 GUI to successfully program my LPC11C14/301 via a PCAN USB.

I am struggling to get a working script to program it on the command line.

"Save Command Line Directives" gives me the following script:

Code: [Select]
COM(0, 9600)
DEVICE(LPC11C14/301 CAN, 0.000000)
ERASEUSED(C:\Firmware\Luci\Cortex\Luci_Cortex_V1_01.hex, PROTECTISP)
HEXFILE(C:\Firmware\Luci\Cortex\Luci_Cortex_V1_01.hex, NOCHECKSUMS, NOFILL, PROTECTISP)

Line 1 fails (not surprisingly) so I deleted it.
Line 2 fails with "unknown device", so I deleted the whitespace before "CAN".

This gives me the following script:

Code: [Select]
DEVICE(LPC11C14/301CAN, 12.000000)
ERASEUSED(C:\Firmware\Luci\Cortex\Luci_Cortex_V1_01.hex, PROTECTISP)
HEXFILE(C:\Firmware\Luci\Cortex\Luci_Cortex_V1_01.hex, NOCHECKSUMS, NOFILL, PROTECTISP)

I now get "Connection failed: comms error".

Is there an undocumented command to set up the CAN communication parameters?

Any help gratefully received,   

  Bob

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2172
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: LPC11C14/301 Command Line Script
« Reply #1 on: September 29, 2011, 09:11:14 pm »
Try:

CAN(interface, baudrate, nodeid, sdotimeout)

where interface is one of:

PEAK PCAN PCI
PEAK PCAN USB
PEAK PCAN PCCARD

Thanks for pointing out the issue with the command line directives generation and the missing documentation - we will fix this for the next release.

Andy
Embedded Systems Academy, Inc.
support at esacademy dot com

b_bann

  • Jr. Member
  • **
  • Posts: 7
    • View Profile
    • Email
Re: LPC11C14/301 Command Line Script
« Reply #2 on: September 30, 2011, 04:40:39 am »
Many Thanks,

I can now successfully erase the device, but the programming step still fails

Sending

Code: [Select]
CAN(PEAK PCAN USB, 100, 0x7D, 1000)
DEVICE(LPC11C14/301CAN, 12.000000)
ERASEUSED(cortex.hex, PROTECTISP)
HEXFILE(cortex.hex, NOCHECKSUMS, NOFILL, PROTECTISP)

gives

Code: [Select]
Flash Magic Version 5.91.2465
8051/XA Driver Version 2.79.2440
ARM UART Driver Version 2.18.2440
ARM Cortex UART Driver Version 1.52.2465
ARM Ethernet Driver Version 1.09.2440
ARM CAN Driver Version 1.09.2440
(C) Embedded Systems Academy 2000-2011 All rights reserved
NON PRODUCTION USE ONLY
Connected
Device selected
Erase complete (USED)
Hex file programming failed: invalid command (cortex.hex)

The file successfully loads using the GUI, so I know it's good.

Am I missing something obvious?

  Cheers,

       Bob

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2172
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: LPC11C14/301 Command Line Script
« Reply #3 on: October 04, 2011, 08:37:44 pm »
Please email us a debug file referencing this post. Add the DEBUG directive and the file flashmagic.fmd will be created, either in C:\ or in Users\myusername\AppData.

Andy
Embedded Systems Academy, Inc.
support at esacademy dot com

b_bann

  • Jr. Member
  • **
  • Posts: 7
    • View Profile
    • Email
Re: LPC11C14/301 Command Line Script
« Reply #4 on: October 12, 2011, 01:32:15 am »
Debug file emailed to "support" on 5th October

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2172
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: LPC11C14/301 Command Line Script
« Reply #5 on: October 12, 2011, 02:15:45 am »
Sorry, we never received it. Please try again.

Andy
Embedded Systems Academy, Inc.
support at esacademy dot com

b_bann

  • Jr. Member
  • **
  • Posts: 7
    • View Profile
    • Email
Re: LPC11C14/301 Command Line Script
« Reply #6 on: October 13, 2011, 03:29:58 am »
Sent again 13th Oct 2011. Sent to support_at_esacademy_dot_com.
Sent a second copy from a different address.

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2172
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: LPC11C14/301 Command Line Script
« Reply #7 on: October 14, 2011, 01:21:22 am »
Nope, still not received it. I've sent you an email with some instructions for uploading it to our server.

Andy
Embedded Systems Academy, Inc.
support at esacademy dot com

b_bann

  • Jr. Member
  • **
  • Posts: 7
    • View Profile
    • Email
Re: LPC11C14/301 Command Line Script
« Reply #8 on: October 17, 2011, 05:30:31 am »
All these issues have been resolved in V5.92.

Many thanks for your help Andy,

   Bob