loripino21

Forum Replies Created

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • in reply to: VisualGDB not flashing device #7275
    loripino21
    Participant

    Ok, it works now! Thanks!

    Regarding Segger J-Link: i can’t understand if my device is supported and if I will be able to use the current STLink USB interface or I need to buy their hardware.

    My device is a ST STM32F429 discovery. Thanks, Lorenzo

    in reply to: VisualGDB not flashing device #7264
    loripino21
    Participant

    Ok, it flashes but if I try to set more than 4 breakpoints:

    Info : no flash patch comparator unit available for hardware breakpoint
    Error: can’t add breakpoint: resource not available

    • This reply was modified 8 years, 5 months ago by loripino21.
    in reply to: VisualGDB not flashing device #7263
    loripino21
    Participant

    I tried it, flashing does NOT work using .bin file:

    mon program D:/Documenti/Programmazione/BoardSTM33F429I/Miosix/MiosixProject/Debug/HALDemo.bin verify
    &”mon program D:/Documenti/Programmazione/BoardSTM33F429I/Miosix/MiosixProject/Debug/HALDemo.bin verify\n”
    @”target state: halted\n”
    @”target halted due to debug-request, current mode: Thread \n”
    @”xPSR: 0x01000000 pc: 0x08012070 msp: 0x10000200\n”
    @”** Programming Started **\n”
    @”auto erase enabled\n”
    @”no flash bank found for address 0\n”
    @”wrote 0 bytes from file D:/Documenti/Programmazione/BoardSTM33F429I/Miosix/MiosixProject/Debug/HALDemo.bin in 0.000000s (nan KiB/s)\n”
    @”** Programming Finished **\n”
    @”** Verify Started **\n”
    @”target state: halted\n”
    @”target halted due to breakpoint, current mode: Thread \n”
    @”xPSR: 0x61000000 pc: 0x2000002e msp: 0x10000200\n”
    @”checksum mismatch – attempting binary compare\n”
    @”diff 0 address 0x00000001. Was 0x02 instead of 0x00\n”
    @”diff 1 address 0x00000002. Was 0x00 instead of 0x02\n”
    @”diff 2 address 0x00000003. Was 0x10 instead of 0x20\n”
    @”diff 3 address 0x00000004. Was 0x71 instead of 0x09\n”
    @”diff 4 address 0x00000005. Was 0x20 instead of 0x00\n”
    @”diff 5 address 0x00000006. Was 0x01 instead of 0x00\n”
    […..]
    @”More than 128 errors, the rest are not printed.\n”
    @”embedded:startup.tcl:454: Error: ** Verify Failed **\n”
    @”in procedure ‘program’ \n”
    @”in procedure ‘program_error’ called at file \”embedded:startup.tcl\”, line 498\n”
    @”at file \”embedded:startup.tcl\”, line 454\n”
    ^done

    But WORKS with .elf file!!

    mon program D:/Documenti/Programmazione/BoardSTM33F429I/Miosix/MiosixProject/Debug/HALDemo.elf verify
    &”mon program D:/Documenti/Programmazione/BoardSTM33F429I/Miosix/MiosixProject/Debug/HALDemo.elf verify\n”
    @”target state: halted\n”
    @”target halted due to debug-request, current mode: Thread \n”
    @”xPSR: 0x01000000 pc: 0xfffffffe msp: 0xfffffffc\n”
    @”** Programming Started **\n”
    @”auto erase enabled\n”
    @”target state: halted\n”
    @”target halted due to breakpoint, current mode: Thread \n”
    @”xPSR: 0x61000000 pc: 0x20000042 msp: 0xfffffffc\n”
    @”wrote 16384 bytes from file D:/Documenti/Programmazione/BoardSTM33F429I/Miosix/MiosixProject/Debug/HALDemo.elf in 0.625011s (25.600 KiB/s)\n”
    @”** Programming Finished **\n”
    @”** Verify Started **\n”
    @”target state: halted\n”
    @”target halted due to breakpoint, current mode: Thread \n”
    @”xPSR: 0x61000000 pc: 0x2000002e msp: 0xfffffffc\n”
    @”verified 264 bytes in 0.046877s (5.500 KiB/s)\n”
    @”** Verified OK **\n”
    ^done

    I can agree that the device is flashed correctly and debug works.

    Ok. Now? Is there any method to overwrite default flash command?

    P.S.: I did other tests. If I create a new project using default SysGCC toolchain, but i manually modify Makefile such that it compiles using my toolchain but it runs debug using SysGCC (i.e. for the command –interpreter mi xxx.elf), it compiles & flashes correctly!

    At this point I guess there is some incompatibilities between visualgdb and my modified toolchain…

     

    in reply to: VisualGDB not flashing device #7256
    loripino21
    Participant

    Hi, I tried everything.

    If I create a demo project, for example LED flashing HALDemo, it works perfectly. I completely erased the device flash, run debug again and everything worked flawlessy, breakpoints included.

    Then I replaced generated elf and bin file with those of non-working project, started debugging without recompiling and the device was flashed correctly!! compare-sections succeds.

    I tried creating similar projects with different toolchains, and guess what? When I select SysGCC toolchain for projects, it always flash correctly the device. When I select my custom miosix toolchain, it won’t flash, regardless the file to flash was generated with one or the another toolchain.

    How to fix this problem? How is toolchain involved in flashing process?

    in reply to: VisualGDB not flashing device #7254
    loripino21
    Participant

    Here is the output of compare-sections:

    compare-sections
    &”compare-sections\n”
    ~”Section .text, range 0x8000000 — 0x8016590: MIS-MATCHED!\n”
    ~”Section .ARM.exidx, range 0x8016590 — 0x8017118: MIS-MATCHED!\n”
    ~”Section .data, range 0x8017118 — 0x8017628: MIS-MATCHED!\n”
    &”warning: One or more sections of the remote executable does not match\nthe loaded file\n”
    &”\n”
    ^done

    As expected, all sections mismatch.

    maint info sections
    &”maint info sections\n”
    ~”Exec file:\n”
    ~”    `D:\\Documenti\\Programmazione\\BoardSTM33F429I\\Miosix\\EmbeddedProject1\\Debug\\EmbeddedProject1.elf’, file type elf32-littlearm.\n”
    ~”    0x8000000->0x8016590 at 0x00008000: .text ALLOC LOAD READONLY CODE HAS_CONTENTS\n”
    ~”    0x8016590->0x8017118 at 0x0001e590: .ARM.exidx ALLOC LOAD READONLY DATA HAS_CONTENTS\n”
    ~”    0xd0000000->0xd0000510 at 0x00020000: .data ALLOC LOAD DATA HAS_CONTENTS\n”
    ~”    0xd0000510->0xd0000878 at 0x00020510: .bss ALLOC\n”
    ~”    0x0000->0xfbd86 at 0x00020510: .debug_info READONLY HAS_CONTENTS\n”
    ~”    0x0000->0x192d8 at 0x0011c296: .debug_abbrev READONLY HAS_CONTENTS\n”
    ~”    0x0000->0x4f9ba at 0x0013556e: .debug_loc READONLY HAS_CONTENTS\n”
    ~”    0x0000->0x2638 at 0x00184f28: .debug_aranges READONLY HAS_CONTENTS\n”
    ~”    0x0000->0xc2f8 at 0x00187560: .debug_ranges READONLY HAS_CONTENTS\n”
    ~”    0x0000->0x2355f at 0x00193858: .debug_line READONLY HAS_CONTENTS\n”
    ~”    0x0000->0x2c988 at 0x001b6db7: .debug_str READONLY HAS_CONTENTS\n”
    ~”    0x0000->0x0011 at 0x001e373f: .comment READONLY HAS_CONTENTS\n”
    ~”    0x0000->0x0037 at 0x001e3750: .ARM.attributes READONLY HAS_CONTENTS\n”
    ~”    0x0000->0x680c at 0x001e3788: .debug_frame READONLY HAS_CONTENTS\n”
    ^done

    All sections are within flash range of my device, ST STM32F429ZiT6U.  The only strange thing to me is that .bss section has not the load attribute.

    Any hints?

    in reply to: VisualGDB not flashing device #7250
    loripino21
    Participant

    I thought it would be better to attach the whole demo project to let you test everything. I use a customized toolchain, you can download it from https://miosix.org/wiki/index.php?title=Miosix_Toolchain.

    The demo project: https://www.dropbox.com/s/jen77y8xg3rit92/EmbeddedProject1.zip?dl=1

    You can test if VisualGDB is flashing by going to definition of ledOn/Off and change the pin number.

    in reply to: VisualGDB not flashing device #7249
    loripino21
    Participant

    Hi,

    I have tried to run again the debug. I have just now noticed the option “RAW output from GDB” and I was able to see even flash commands. But I can swear the device is not baing flashed: I am working with a simple ledon/off and even if I switch led in the code the board keeps flashing always the same. In the zip you can find debug.mak and Makefile modified by me, according to the demoMakefile which is included with the kernel. Notice the ‘include Makefile.inc’ command, that file is attached. LINKER_SCRIPT is not configured in debug.mak since it’s already set by makefile.inc when including it; I have put it in the zip if it may be needed.

    https://www.dropbox.com/s/a2tg6coc7rb2twl/VisualGDBIssue.zip?dl=1

    Thanks for the help!!

Viewing 7 posts - 1 through 7 (of 7 total)