analogdevicesinc / EVAL-ADICUP3029

This repo includes examples which run on the EVAL-ADICUP3029 ARM Cortex-M3 processor development platform from Analog Devices.
https://wiki.analog.com/resources/eval/user-guides/eval-adicup3029
Other
38 stars 63 forks source link

Unable to flash ADuCM3029_demo_cn0428_cn0429.hex using drag-and-drop or CrossCore #78

Closed jpagliaccio closed 3 years ago

jpagliaccio commented 3 years ago

Unable to flash ADuCM3029 with the demo hex file: ADuCM3029_demo_cn0428_cn0429.hex

image

CrossCore will "Erase" but it will not flash(Program) the hex files.
We have tried on 2 new different ADuCM3029 boards. Boards are marked: 08-044136 REV C

After booting with the BOOT button pressed and the options above - the message from Crosscore:

Sending second stage kernel.
  Read Intel HEX application image with 668 bytes.
  Received autobaud response:
    Product ID: ADuCM302x      
    Revision: 431
    Serial number: 1176E5C478F4DB935362A00043430333
    User code blank.
    User code checksum failed.
    Write protection disabled.
    Read protection enabled.
  Sent 668/668 bytes.
  Download completed.
  Run command sent.
Programming flash image.
  Binary flash image with 0 bytes too large for target.

The contents of DETAILS.TXT:

# DAPLink Firmware - see https://mbed.com/daplink
Unique ID: 0600000053454e45005280080074004cfd71000197969900
HIC ID: 97969900
Auto Reset: 0
Automation allowed: 0
Daplink Mode: Interface
Interface Version: 0242
Bootloader Version: 0242

USB Interfaces: MSD, CDC, HID
Bootloader CRC: 0xb3954be4
Interface CRC: 0x8e62b75b

The head and tail of the ADuCM3029_demo_cn0428_cn0429.hex file from from your Git:

<<<<<<< HEAD
:1000000000400020052B0000412B0000412B000088
:10001000412B0000412B0000412B0000000000009C
:10002000000000000000000000000000412B000064
:10003000412B000000000000412B0000412B00007C
:1000400055190000412B0000412B0000412B0000FE
:10005000412B0000412B00008D14000041140000D2
:100060008D1600007106000081060000412B000083
:10007000412B0000412B000005240000412B000013
:10008000412B0000412B0000210F0000B9030000AC
:10009000412B0000412B0000412B0000412B0000B0
:1000A000412B0000412B0000412B0000412B0000A0
:1000B000252700004D270000412B0000412B0000A8
:1000C000412B0000412B0000412B0000412B000080
:1000D000412B0000412B0000412B0000412B000070
:1000E000412B00009D130000412B0000391300003C
:1000F000412B0000412B0000412B000000000000BC
:1001000000000000000000000000000000000000EF
:1001100000000000000000000000000000000000DF
:10012000412B0000412B0000412B0000412B00001F
:10013000412B0000412B0000412B0000412B00000F
:10018000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7F
:1001900003329CA77F000000FFFFFFFFFFFFFFFF70
:1001A00010B5054C237833B9044B13B10448AFF3B1
:1001B00000800123237010BD000C0420000000000B
:1001C000B8B301000C4B43B10C4810B50C49AFF368

... 

:10C4080000000000000000000000000043000000E1
:10C418000000000000000000000000000000000014
:10C4280000000000000000000000000043000000C1
:10C4380000000000000000000000000000000000F4
:10C4480000000000000000000000000043000000A1
:10C4580000000000000000000000000000000000D4
:10C468000000000000000000000000004300000081
:10C4780000000000000000000000000000000000B4
:10C48800000000000000000000000000FD7A01002C
:10C4980009700100000000007CB00100E8AB010059
:10C4A80018A8010018A8010018A8010018A8010080
:10C4B80018A8010018A8010018A8010018A8010070
:10C4C80018A80100FFFFFFFFFFFFFFFFFFFFFFFFAF
:10C4D800FFFF0000010041534349490000000000EC
:10C4E8000000000000000000000000000000000044
:10C4F80000000000000041534349490000000000CB
:10C508000000000000000000000000000000000023
:10C518000000000000000000B9510100C501000042
:10C5280031690000517A0000A101000000000000FC
:0400000300002B05C9
:00000001FF
>>>>>>> 6686c2c... adicup3029: Prepare projects for autobuild
mchindri commented 3 years ago

Hi jpagliaccio, You just need to drag and drop the .hex file in the Daplink device. .hex files don't need the flash programmer.

jpagliaccio commented 3 years ago

When I do that I get the "FAIL.TXT" file after the reboot with the contents:

"An error occurred during the transfer"

That is why we are trying CrossCore as the alternative method.

mchindri commented 3 years ago

Can you try to update the daplink firmware. See: https://wiki.analog.com/resources/eval/user-guides/eval-adicup3029/tools/adicup3029_hw_drivers#maintenance_drive And then try again

mchindri commented 3 years ago

If this is still not working please try to address your issue to https://ez.analog.com/analog-microcontrollers/ultra-low-power-microcontrollers It seems to be a board problem no regarding with the software in the repository.

dgalperingit commented 3 years ago

I'm a colleague of jpagliaccio's and we are both having the same issue.

FWIW, we are able to load the example code for ADuCM302x-Button from CrossCore with the readout: Sending second stage kernel. Read Intel HEX application image with 668 bytes. Received autobaud response: Product ID: ADuCM302x
Revision: 431 Serial number: 1176E54DFCF5D993E08FA00043430333 User code blank. User code checksum failed. Write protection disabled. Read protection enabled. Sent 668/668 bytes. Download completed. Run command sent. Programming flash image. Read Intel HEX flash image with 12680 bytes. Autobaud succeeded. Erased 7/7 pages. Erase completed. Flashed 12680/12680 bytes. Flash completed. Done.

This makes me think the issue is actually code related, rather than hardware related.

adrimbarean commented 3 years ago

Are you able to flash the blinky program and run it successfully?

jpagliaccio commented 3 years ago

Yes. The example aducm_blinky_example_aducm3029_simple.hex works okay but ADuCM3029_demo_cn0428_cn0429.hex does not.

If I open those 2 hex file in VS Code they have different headers and footers. Have you tried to flash ADuCM3029_demo_cn0428_cn0429.hex?

adrimbarean commented 3 years ago

I did successfully by dag-n-dropping. I've not been able to reproduce the error so far. Let's try something else: are you able to flash this program?

jpagliaccio commented 3 years ago

So we edited your hex file: ADuCM3029_demo_cn0428_cn0429.hex and removed the header and footer lines. Now it will flash with a simple drag-and-drop but the demo code is not reliable - I randomly get "XXXXX timeout" and can not read 'Z' mode - conductivity at all when running the "measuresensor" command. I get temperature but not conductivity- just times out and then the entire eval board needs to be rebooted. Thanks for your help.

mchindri commented 3 years ago

Are you using the .hex file from here https://github.com/analogdevicesinc/EVAL-ADICUP3029/releases/download/Latest/ADuCM3029_demo_cn0428_cn0429.hex ? I saw there is also a .hex file in https://github.com/analogdevicesinc/EVAL-ADICUP3029/blob/master/projects/ADuCM3029_demo_cn0428_cn0429/Release/ADuCM3029_demo_cn0428_cn0429.hex but that was added by mistake and it has a bad first line.

If you are using the correct one then I also created this PR:https://github.com/analogdevicesinc/EVAL-ADICUP3029/pulls. When it is merged the .hex files will be updated and may fix your issue.

Anyway, if you want to build and edit the project by yourself, you can follow this guide: https://wiki.analog.com/resources/eval/user-guides/eval-adicup3029/tools/cces_user_guide

mchindri commented 3 years ago

The issue was found. This commit has introduces a merge conflict in the .hex file that wasn't solved. https://github.com/analogdevicesinc/EVAL-ADICUP3029/commit/50cc2af0d7f0d3ee92417b6e9f75a65295d07e7b#diff-5247da855a38640f5acce2a27056e012983da1d4ae6db4c63a9dd06aa03dc4cd

This PR https://github.com/analogdevicesinc/EVAL-ADICUP3029/pull/80 adds back again the previous working version of the .hex file.