2024-02-01 05:51 AM - last edited on 2024-02-05 05:41 AM by SofLit
Hi,
I am new about dual core mcu. I have stm32h745 mcu.
I am working about inter core comminication, Firstly setting some setting on CubeMx.
When I create project codes, CubeMx creat 2 openamp library for each mcu(m4/m7).
After that I am trying build, and getting error like this.
Error: L6200E: Symbol OPENAMP_init_ept multiply defined (by openamp_1.o and openamp.o).
16 times geting similar error like this.
Why CubeMx create wrong library.
CubeIde working properly. (create only 1 library set)
Solved! Go to Solution.
2024-02-07 07:14 AM - edited 2024-02-07 07:25 AM
Add-on:
For IAR in the .icf files add:
define symbol __OPENAMP_region_start__ = 0x38000400;
define symbol __OPENAMP_region_size__ = 0xB000;
export symbol __OPENAMP_region_start__;
export symbol __OPENAMP_region_size__;
PS: 0x38000400 and 0xB000 are only examples. You can change them if you want. Just be sure they are not interleaving with other used memory regions.
2024-02-01 06:38 AM - edited 2024-02-01 06:39 AM
Hello,
I tried to start a project with OpenAmp on stm32h745 and didn't face any issue.
Which IDE are you using?
I attached a project created with STM32CubeIDE.
PS: you can inspire from the examples provided in STM32CubeH7 from this link: https://github.com/STMicroelectronics/STM32CubeH7/tree/master/Projects/STM32H747I-EVAL/Applications/OpenAMP
2024-02-01 09:50 PM - edited 2024-02-01 10:44 PM
Thanks for replys.
My IDE Keil uVision V5.26.2.0
2024-02-02 03:08 AM - edited 2024-02-02 03:11 AM
Hello,
Thank you for the feedback. Is that possible to generate the project with CubeIDE and tell what it happens?
PS: I have errors with KEIL (but are not the same as yours) and IAR .. (already reported the issue internally on ticket 172397.
What is the CubeMx version you're using?
2024-02-04 10:45 PM
Hello,
CubeMX version 6.9.0. When Update Cube Mx to 6.10.0, the error disappered. Now I have new errors. :)
dual__CM4\dual__CM4.axf: Error: L6218E: Undefined symbol Image$$__OpenAMP_SHMEM__$$Base (referred from openamp.o).
dual__CM4\dual__CM4.axf: Error: L6218E: Undefined symbol Image$$__OpenAMP_SHMEM__$$ZI$$Length (referred from openamp.o).
I think it is about linker file. I can not configure linker file and this error occur.
Is there an any document for OpenAmp Linker configuration?
Or any advice about this error?
2024-02-05 02:09 AM
Hello,
This is the exact issue that I had.
As I said I've already reported internally to fix the issue in the ticket 172397. The dev team will handle this.
Thank you.
2024-02-05 04:17 AM
Hi,
Thank you. I am waiting for solution. Is there an any notification about solution for me?
2024-02-05 04:36 AM
Don't worry, if there will be any news I will let you know ;)
2024-02-07 07:04 AM - edited 2024-02-07 07:24 AM
Hello,
In the linker files (.sct) add this line
__OpenAMP_SHMEM__ 0x38000400 EMPTY 0x0000B000 {} ; Shared Memory area used by OpenAMP
Read the comment in \OPENAMP\openamp_conf.h at line 126:
#elif defined(__CC_ARM) || defined (__clang__)
/*
* For MDK-ARM, the scatter file .sct should contain the following line:
* LR_IROM1 .... {
* ...
* __OpenAMP_SHMEM__ 0x38000400 EMPTY 0x0000B000 {} ; Shared Memory area used by OpenAMP
* }
*
*/
extern unsigned int Image$$__OpenAMP_SHMEM__$$Base;
extern unsigned int Image$$__OpenAMP_SHMEM__$$ZI$$Length;
#define SHM_START_ADDRESS (unsigned int)&Image$$__OpenAMP_SHMEM__$$Base
#define SHM_SIZE ((size_t)&Image$$__OpenAMP_SHMEM__$$ZI$$Length)
2024-02-07 07:14 AM - edited 2024-02-07 07:25 AM
Add-on:
For IAR in the .icf files add:
define symbol __OPENAMP_region_start__ = 0x38000400;
define symbol __OPENAMP_region_size__ = 0xB000;
export symbol __OPENAMP_region_start__;
export symbol __OPENAMP_region_size__;
PS: 0x38000400 and 0xB000 are only examples. You can change them if you want. Just be sure they are not interleaving with other used memory regions.