How to use USBDM with KL27 bootloader? SIGINT

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to use USBDM with KL27 bootloader? SIGINT

893 Views
bobpaddock
Senior Contributor III

I have installed USBDM_4_12_1_80_Win_A.msi ​​which I want to use to debug a MKL27Z256M4 via a Freedom MKL25 board.

I start up the GDB server then in GDB enter the following:

target remote :1234

b main

continue

which results in:

Program received signal SIGINT, Interrupt.

0x1c0000C0 in ?? ()

0x1c0000c0 would be someplace in the bootloader.

Is there something I need to turn off to get the bootloader out of the way?

Where is this 'SIGINT' coming from?

0 Kudos
2 Replies

525 Views
pgo
Senior Contributor V

Hi Bob,

I was not able to reproduce your problem using the following test:

  • Create a basic project using the USBDM new project wizard in KDS
  • Checked debugging of the project in KDS which will program the chip and uses the GDB server.
  • Manually started GDB and tried the following commands which seemed to work OK

(gdb) target remote :1234

Remote debugging using :1234

0x000013b0 in ?? ()

(gdb) file  C:\\Users\\podonoghue\\workspace.kds\\frdm-kl27\\Debug\\frdm-kl27.elf

A program is being debugged already.

Are you sure you want to change the file? (y or n) y

Reading symbols from C:\Users\podonoghue\workspace.kds\frdm-kl27\Debug\frdm-kl27.elf...done.

(gdb) b main

Breakpoint 1 at 0x1480: file ../Sources/main.cpp, line 24.

(gdb) mon reset

User reset of target

(gdb) continue

Continuing.

Note: automatically using hardware breakpoints for read-only addresses.

Breakpoint 1, main () at ../Sources/main.cpp:24

24         Led::setOutput();

(gdb) continue

Continuing.

<ctrl-C>

Program received signal SIGINT, Interrupt.

USBDM::getTicks () at C:/Users/podonoghue/workspace.kds/frdm-kl27/Project_Headers/delay.h:53

53      }

(gdb)

I added the mon reset otherwise the program would already be running and the break-point would not occur.

I have attached the project and .elf file used.

The code does set up the bootloader options but I can't remember off-hand what the various options mean.  Have a look in the vectors.c file.

If you are using KDS you can change the options using the configuration editor.

pastedImage_2.png

bye

0 Kudos

525 Views
bobpaddock
Senior Contributor III

Thank you, that got me further down the path.

The difference between your working version and mine was in the setting of the FOPT byte in the flash configuration section 0x400->0x040F.

I get further, alas before I reach main() I get 'connection lost'.  Ideas?

Off to tediously single step till find the point causing the disconnection...

0 Kudos