[SOLVED] Debug in SEGGER_RAM

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

  • [SOLVED] Debug in SEGGER_RAM

    Hello, we use ses to develop on STM32H743I, when we use SEGGER_RAM.icf, develop and debug in memory, in __segger_init_copy bug with BEBE bkpt #0xBE.
    [/quote]Can someone tell us what the problem is?

    Source Code

    1. define memory with size = 4G;
    2. //
    3. // Combined regions per memory type
    4. //
    5. define region RAM = RAM1;
    6. //
    7. // Block definitions
    8. //
    9. define block ctors { section .ctors, section .ctors.*, block with alphabetical order { init_array } };
    10. define block dtors { section .dtors, section .dtors.*, block with reverse alphabetical order { fini_array } };
    11. define block exidx { section .ARM.exidx, section .ARM.exidx.* };
    12. define block tbss { section .tbss, section .tbss.* };
    13. define block tdata { section .tdata, section .tdata.* };
    14. define block tls with fixed order { block tbss, block tdata };
    15. define block tdata_load { copy of block tdata };
    16. define block heap with auto size = __HEAPSIZE__, alignment = 8, /* fill =0x00, */ readwrite access { };
    17. define block stack with size = __STACKSIZE__, alignment = 8, /* fill =0xCD, */ readwrite access { };
    18. define block stack_process with size = __STACKSIZE_PROCESS__, alignment = 8, /* fill =0xCD, */ readwrite access { };
    19. //
    20. // Explicit initialization settings for sections
    21. // Packing options for initialize by copy: packing=auto/lzss/zpak/packbits
    22. //
    23. do not initialize { section .non_init, section .non_init.*, section .*.non_init, section .*.non_init.* };
    24. do not initialize { section .no_init, section .no_init.*, section .*.no_init, section .*.no_init.* }; // Legacy sections, kept for backwards compatibility
    25. do not initialize { section .noinit, section .noinit.*, section .*.noinit, section .*.noinit.* }; // Legacy sections, used by some SDKs/HALs
    26. do not initialize { section .vectors_ram };
    27. initialize by copy with packing=auto { section .data, section .data.*, section .*.data, section .*.data.* }; // Static data sections
    28. initialize by copy with packing=auto { section .fast, section .fast.*, section .*.fast, section .*.fast.* }; // "RAM Code" sections
    29. #define USES_ALLOC_FUNC \
    30. linked symbol malloc || linked symbol aligned_alloc || \
    31. linked symbol calloc || linked symbol realloc
    32. initialize by calling __SEGGER_init_heap if USES_ALLOC_FUNC { block heap }; // Init the heap if one is required
    33. initialize by calling __SEGGER_init_ctors { block ctors }; // Call constructors for global objects which need to be constructed before reaching main (if any). Make sure this is done after setting up heap.
    34. //assert with warning "free() linked into application but there are no calls to an allocation function!" {
    35. // linked symbol free => USES_ALLOC_FUNC
    36. //};
    37. assert with error "heap is too small!" { USES_ALLOC_FUNC => size of block heap >= 48 };
    38. assert with error "heap size not a multiple of 8!" { USES_ALLOC_FUNC => size of block heap % 8 == 0 };
    39. assert with error "heap not correctly aligned!" { USES_ALLOC_FUNC => start of block heap % 8 == 0 };
    40. initialize by calling __SEGGER_STOP_X_InitLimits { section .data.stop.* };
    41. //
    42. // Explicit placement in RAMn
    43. //
    44. place in RAM1 { section .RAM1, section .RAM1.* };
    45. //
    46. // RAM Placement
    47. //
    48. place at start of RAM { section .vectors }; // Vector table section
    49. place in RAM with minimum size order { block tdata_load, // Thread-local-storage load image
    50. block exidx, // ARM exception unwinding block
    51. block ctors, // Constructors block
    52. block dtors, // Destructors block
    53. readonly, // Catch-all for readonly data (e.g. .rodata, .srodata)
    54. readexec // Catch-all for (readonly) executable code (e.g. .text)
    55. };
    56. place in RAM with auto order { section .fast, section .fast.*, // "ramfunc" section
    57. block tls, // Thread-local-storage block
    58. readwrite, // Catch-all for initialized/uninitialized data sections (e.g. .data, .noinit)
    59. zeroinit // Catch-all for zero-initialized data sections (e.g. .bss)
    60. };
    61. place in RAM { block heap }; // Heap reserved block
    62. place at end of RAM with fixed order { block stack_process,
    63. block stack }; // Stack reserved block at the end
    Display All
    [img]https://attachment.outlook.live.net/owa/MSA%3Astevenzhang2024%40outlook.com/service.svc/s/GetAttachmentThumbnail?id=AQMkADAwATM0MDAAMS02OWUzLWNhNTgtMDACLTAwCgBGAAADaz2psjcAS0STkWo5FYrxNAcAPkbXGZ5qBUakYTHdHJGX2AAAAgEMAAAAPkbXGZ5qBUakYTHdHJGX2AAAAFK7%2BbEAAAABEgAQAE20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tbEW9lJd6q26NNSuK2oXdAfStvXpuZeHK6N0_UecQp7BKIAKfEntIROFBt2BHvauB10RGZQaLPYHHxrYHc9algWeSLQaCK0wipA1AAzLvIksBGKVKMzXdd5VJBRct9rZYrAABjn6GmxzPCDIvDOdd2z3i9Ds-Jm2NZRZ5YF_ELzISmrX9s5Bgk1g3fUkVh92DAUhGu8cERS_myy-r1a2RYYZ41HVxVOOcojxYhyFhgQAeyEWRKs3_FMg6l5laGOXdgWrv6nE39lnclgmfLdQz_HL46nQGMKUGvajpGC82rzRqXodlQ&X-OWA-CANARY=bdvoVwzo5OwAAAAAAAAAAIBJPdM_hdwYjmuahDmTGYBRKzzKMuvUNS-9OQabCrKet1ojIbqky5E.&owa=outlook.live.com&scriptVer=20240524003.05&clientId=FADF80BA20504BAA8F94E0D12FC49A61&animation=true[/img][img]https://attachment.outlook.live.net/owa/MSA%3Astevenzhang2024%40outlook.com/service.svc/s/GetAttachmentThumbnail?id=AQMkADAwATM0MDAAMS02OWUzLWNhNTgtMDACLTAwCgBGAAADaz2psjcAS0STkWo5FYrxNAcAPkbXGZ5qBUakYTHdHJGX2AAAAgEMAAAAPkbXGZ5qBUakYTHdHJGX2AAAAFK7%2BbEAAAABEgAQAMXNIkyjoZ9AoQ8Z16T14s0%3D&thumbnailType=2&isc=1&token=eyJhbGciOiJSUzI1NiIsImtpZCI6IkU1RDJGMEY4REE5M0I2NzA5QzQzQTlFOEE2MTQzQzAzRDYyRjlBODAiLCJ0eXAiOiJKV1QiLCJ4NXQiOiI1ZEx3LU5xVHRuQ2NRNm5vcGhROEE5WXZtb0EifQ.eyJvcmlnaW4iOiJodHRwczovL291dGxvb2subGl2ZS5jb20iLCJ1YyI6IjJmYWIxMGQ3NzViZjQ3YjdiZWYwYzE4MTAyN2UxMGIyIiwidmVyIjoiRXhjaGFuZ2UuQ2FsbGJhY2suVjEiLCJhcHBjdHhzZW5kZXIiOiJPd2FEb3dubG9hZEA4NGRmOWU3Zi1lOWY2LTQwYWY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er=20240524003.05&clientId=FADF80BA20504BAA8F94E0D12FC49A61&animation=true[/img]

    The post was edited 1 time, last by ZSteven2015 ().

  • Hello,

    Thank you for your inquiry.

    The attachment unfortunately did not work, what is the exact error message?

    The issue may be related to an incorrect project configuration.
    We generally recommend to use a CPU support package when first setting up a project, as the project is then correctly prepared for your specific device.
    For more information take a look at our website: https://www.segger.com/products/development-tools/embedded-studio/technology/cpu-support/


    Best regards,
    SebastianB
    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.