I'm experiencing difficulties with Harmony bootloader on SAME70N20B
chip. I want to build simple bootloader to be able to flash firmware via UART4. I'm not able to use integrated SAMBA
bootloader, because it operates on UART0 (maybe not UART0, not sure now), which isn't accessible on my board. There is no way to change board design.
I have downloaded MPLAB X IDE, made new project and via MCC Content Manager Wizard
added some harmony packages. I'm not sure, what exact packeges it was, I'm not able to open the same window now, MCC button opens Project Graph now, but It was something related with ATSAME70, UART and some core Harmony package.
Project graph window appeared with nodes EFC
, Device Family Pack
, System
and CMSIS Pack
. I have added UART Bootloader
and UART4
and connected them to each other. I have also find Pin Settings
window, where I have asigned PD18
and PD19
to UART4. Clock settings should be OK by default, I have checked it. Then I have clicked Generate
button.
Lot of C files appeared in my project, with all the firmware update logic. I have override bootloader trigger, so it should always proceed to bootloader, not to firmware itself (temporary solution, I want to implement here some logic later). I have built it and flash it to the board via Atmel-ICE
debugger. But when I try to flash program via UART with provided python tool, there is no communication from board to computer (from computer to board is).
I have tried to debug generate code with Atmel-ICE
debugger, but when I lay breakpoint, it says Broken Breakpoint
. There is some code running on board, I can read Execution Memory
and view disassembled code. There are some labels, like bootloader_UART_Tasks
or main
, which indicates me, that there is some code builded and flashed an some linker debug files are present.
When I make blank project with some basic led blinking code, I can debug it as fine. I can lay breakpoints, I can step trough code, standard debugging operations...
I'm not familiar with MPLAB IDE, It's not exactly user friendly (It tries to be, which make things way way worse...). I have quite a few experiences wit C and C++ embedded programming and debugging in eclipse, this should be similar, but I'm something missing here.
B.R.
Michal
EDIT: By further investigation, I have found, that debugging works in startup_xc32.c
file, which contains reset handler. Code stepping works here just fine. There must be something wrong with build process, because debugging breaks when code jumps out this file. I'm very confused by this IDE.
Harmony bootloader on SAME70 - no UART communication, debug not working
98 views Asked by Thugmek At
0