Hello,
I'm attempting to upload a program for the MCU and a bootloader to my ATUC256L4U in a production environment. In production they are using a windows .cmd file:
@echo off setlocal enableextensions enabledelayedexpansion : This command script programs the ISP (flash array), the ISP : configuration word (User page) and the general-purpose fuses echo. echo Programming UART bootloader atprogram -t atmelice -i awire -mb 4000000 -d atuc256l4u -v program -c --verify -f uart_bootloader_atuc256l4u.elf program --verify -f userpage_i100.hex write -fs -o 0 --values 73F7FFFF if ERRORLEVEL 1 ( pause )
This works insofar as it seems to write all the data to the MCU but when I power the system on - nothing works. The UART connection between the ATUC256 and my Linux system gets no response.
However, if I use ATMEL STUDIO 7 and manually program the files into the ATUC256 through the "device programming" option - it works. Everything runs. However, when I try to verify the programming I get the error message:
"Verifying Flash...Failed! address=0x80000000 expected=0x48 actual=0x30"
I did an "elfread" on both files - and indeed, it seems as if both of them are writing something to this section of the memory.
The elfread from the bootloader file shows:
Section Headers: [Nr] Name Type Addr Off Size ES Flg Lk Inf Al [ 0] NULL 00000000 000000 000000 00 0 0 0 [ 1] .reset PROGBITS 80000000 000400 000160 00 AX 0 0 4
and from the firmware file:
Section Headers: [Nr] Name Type Addr Off Size ES Flg Lk Inf Al [ 0] NULL 00000000 000000 000000 00 0 0 0 [ 1] .reset PROGBITS 80000000 000400 002010 00 AX 0 0 4
From the datasheet for the MCU it seems to me like this memory location is where the MCU jumps after a reset.
So the difference is in the Size of the two sections - i.e. they are both trying to write something to this section. I don't know what to make of this - and I am not quite sure what I should do to further investigate and fix this problem. Any ideas?
When I program the bootloader last I cannot get any connection to the sensor through UART - it is as if nothing ever gets initialized. I suspect that it never even jumps into main(). When I program the firmware last I am able to run the firmware just fine but the bootloader does not work.