[ABANDONED] Bootloader

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [ABANDONED] Bootloader

    Hello,
    I use STM32F207VC and my bootloader address is between 0x08000000 and 0x08003FFF .
    Application starts at 0x08004000 . But when I start debug , it checks CRC and erases bootloader sectors.
    How can I protect bootloader sectors?
    Regards,

    ilkay KOZAK
  • Hello Ilkay,

    Thank you for your inquiry.
    J-Link will only reprogram memory sections that have changed. So make sure that your debug build does not generate any code for 0x08000000 - 0x08003FFF.
    Could you provide us with a J-Link log file when that happens? wiki.segger.com/Enable_J-Link_log_file
    Would it be possible for you to send us an example project where this issue is reproducible?

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Hello Nino,
    You can find my elf file attached.

    ELF Header is below.
    When I connect using Target/Connect J-Link/Verify , it's output is; ( it flashes bank 0 (0x08000000 - 32K )
    Connecting ?J-Link? using ?USB?
    Connecting to target using SWD
    Loaded /Applications/SEGGER Embedded Studio for ARM 3.34/bin/libjlinkarm.dylib
    Firmware Version: J-Link Pro V4 compiled Dec 12 2017 14:34:30
    DLL Version: 6.22d
    Hardware Version: V4.00
    Target Voltage: 4.603
    Device "STM32F207VE" selected.
    Found SW-DP with ID 0x2BA01477
    Found SW-DP with ID 0x2BA01477
    Scanning AP map to find all available APs
    AP[1]: Stopped AP scan as end of AP map has been reached
    AP[0]: AHB-AP (IDR: 0x24770011)
    Iterating through AP map to find AHB-AP to use
    AP[0]: Core found
    AP[0]: AHB-AP ROM base: 0xE00FF000
    CPUID register: 0x412FC230. Implementer code: 0x41 (ARM)
    Found Cortex-M3 r2p0, Little endian.
    FPUnit: 6 code (BP) slots and 2 literal slots
    CoreSight components:
    ROMTbl[0] @ E00FF000
    ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 002BB000 SCS
    ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 002BB002 DWT
    ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 002BB003 FPB
    ROMTbl[0][3]: E0000000, CID: B105E00D, PID: 002BB001 ITM
    ROMTbl[0][4]: E0040000, CID: B105900D, PID: 002BB923 TPIU-Lite
    ROMTbl[0][5]: E0041000, CID: B105900D, PID: 002BB924 ETM-M3
    Downloading ?STM18.elf? to J-Link
    Programming 16.7 KB of addresses 08004000 ? 08008327
    Programming 0.1 KB of addresses 08008328 ? 080083ef
    J-Link: Flash download: Bank 0 @ 0x08000000: 1 range affected (32768 bytes)
    J-Link: Flash download: Total time needed: 0.925s (Prepare: 0.012s, Compare: 0.023s, Erase: 0.781s, Program: 0.103s, Verify: 0.000s, Restore: 0.002s)

    Download successful-------------------------------------------------------------------------------------------------


    But when I try to debug ;


    Class: ELF32
    Encoding: Little endian
    ELFVersion: Current
    Type: Executable file
    Machine: ARM
    Version: Current
    Entry: 0x80079e5
    Flags: 0x5000200

    Section Headers:
    [ Nr ] Type Addr Size ES Flg Lk Inf Al Name
    [ 0] NULL 00000000 00000000 00 00 000 00
    [ 1] PROGBITS 08004000 00004488 00 AX 00 000 04 .text
    [ 2] ? (0x70000001) 08008488 00000008 00 A 01 000 04 .ARM.exidx
    [ 3] PROGBITS 20000184 000000c8 00 WA 00 000 04 .data
    [ 4] NOBITS 20000250 00005a2c 00 WA 00 000 08 .bss
    [ 5] ? (0x70000003) 00000000 0000002b 00 00 000 01 .ARM.attributes
    [ 6] PROGBITS 00000000 0000007e 01 00 000 01 .comment
    [ 7] PROGBITS 00000000 0006c710 00 00 000 01 .debug_info
    [ 8] PROGBITS 00000000 0000c3b7 00 00 000 01 .debug_abbrev
    [ 9] PROGBITS 00000000 0001443c 00 00 000 01 .debug_loc
    [ 10] PROGBITS 00000000 00001b40 00 00 000 08 .debug_aranges
    [ 11] PROGBITS 00000000 000026f8 00 00 000 08 .debug_ranges
    [ 12] PROGBITS 00000000 0003823b 00 00 000 01 .debug_macro
    [ 13] PROGBITS 00000000 0002cd99 00 00 000 01 .debug_line
    [ 14] PROGBITS 00000000 0010ff79 01 00 000 01 .debug_str
    [ 15] PROGBITS 00000000 000056c0 00 00 000 04 .debug_frame
    [ 16] SYMTAB 00000000 00003d80 10 11 265 04 .symtab
    [ 17] STRTAB 00000000 0000241b 00 00 000 01 .strtab
    [ 18] STRTAB 00000000 000000c3 00 00 000 01 .shstrtab
    Key to Flags: W (write), A (alloc), X (execute)


    Segment headers:
    [ Nr ] Type VirtAddr PhysAddr FileSize Mem.Size Flags Align
    [ 0] ? (0x70000001) 08008488 08008488 00000008 00000008 R 00000004
    [ 1] LOAD 08004000 08004000 00004490 00004490 RX 00000004
    [ 2] LOAD 20000184 08008490 000000c8 000000c8 RW 00000004
    [ 3] LOAD 20000250 08008560 00000000 00005a2c RW 00000008
    Files
    • STM18.zip

      (693.32 kB, downloaded 421 times, last: )
  • Hello Ilkay,

    The logs you provided are not helping.
    Could you provide a J-Link logfile as described in the wiki? wiki.segger.com/Enable_J-Link_log_file

    For reference, could you test if debugging the elf in Ozone works? segger.com/products/development-tools/ozone-j-link-debugger/

    Create a ne ozone project with the project wizard and select your elf file when asked for the Program File.

    Does that work for you?

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.