How can I make a RAM.mot file?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello !
I need to use the Boot Assist Module to boot an application from RS232c bust to internal SRAM.
My MCU is MPC5644A.
So, I made a Ram target RAM.mot file and Binary file. But It doesn't work well.
When I read a discussion(https://community.freescale.com/message/386416#386416), I did modify lcf file.
But, I find out a file is different it.
I use a Codewarrior project wizard for make a project.
A project includes Startup Code.(__ppc_eabi_init.c, MPC5644A_HWInit.c, MPC55xx_init_debug.c, MPC55xx_init.c) So, When I move "entry point (function __start() ) at the start of RAM image – at address 0x4000_0000.", There are some problem.
The problem is 3 warings.
1. multiply-defined: '__start' in Runtime.PPCEABI.VS.UC.a in the file __start.o
Previously defined in __start.o
ignored: '__start' in Runtime.PPCEABI.VS.UC.a from the file __start.o
2. multiply-defined: '__copy_rom_section' in Runtime.PPCEABI.VS.UC.a in the file __start.o
Previously defined in __start.o
ignored: '__copy_rom_section' in Runtime.PPCEABI.VS.UC.a from the file __start.o
3. multiply-defined: '__init_bss_section' in Runtime.PPCEABI.VS.UC.a in the file __start.o
Previously defined in __start.o
ignored: '__init_bss_section' in Runtime.PPCEABI.VS.UC.a from the file __start.o
I think this problem is caused by calling a __startup function by __ppc_eabi_init.c.
What I have to solve this problem?
Refer to my lcf file.
/* lcf file for MPC560xB (debug RAM version) */
/* Note internal memory configurations vary among the various family */
/* devices. */
/* */
/* +-----------+------------+ */
/* | Device | MPC5644A | */
/* +-----------+------------+ */
/* |SRAM/Flash | 192KB/ | */
/* | | 4MB | */
/* +-----------+------------+ */
/* */
/* These memory definitions will allow the stationery example to run on */
/* the smallest */
MEMORY
{
init: org = 0x40000000, len = 0x00000288
pseudo_rom: org = 0x40000288, len = 0x00000D30
exception_handlers: org = 0x40000FB8, len = 0x000000B0
internal_ram: org = 0x40001068, len = 0x00000014
heap : org = 0x4000107C, len = 0x00008000
stack : org = 0x4000907C, len = 0x00008000
}
SECTIONS
{
GROUP : {
.init_vle (VLECODE) : {
*(.init)
*(.init_vle)
}
.init : {}
} > init
GROUP : {
.ivor_branch_table (VLECODE) ALIGN (4096) : {}
.__exception_handlers (VLECODE) LOAD (_e_ivor_branch_table) : {}
} > exception_handlers
GROUP : {
.text (TEXT) ALIGN(0x10) : {}
.text_vle (VLECODE) ALIGN(0x10): {
*(.text)
*(.text_vle)
}
.rodata (CONST) : {
*(.rdata)
*(.rodata)
}
.ctors : {}
.dtors : {}
extab : {}
extabindex : {}
} > pseudo_rom
GROUP : {
.__uninitialized_intc_handlertable ALIGN(0x10) : {}
.data : {}
.sdata : {}
.sbss : {}
.sdata2 : {}
.sbss2 : {}
.bss : {}
} > internal_ram
}
/* Freescale CodeWarrior compiler address designations */
_stack_addr = ADDR(stack)+SIZEOF(stack);
_stack_end = ADDR(stack);
_heap_addr = ADDR(heap);
_heap_end = ADDR(heap)+SIZEOF(heap);
/* Exceptions Handlers Location (used in Exceptions.c for IVPR initialization) */
EXCEPTION_HANDLERS = ADDR(exception_handlers);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I came here because we started getting duplicate symbol warnings for __start & __init_bss_section when linking our application, evidently after upgrading to V2.10 of the compiler. I have been unable to find out where the multiple definitions are but the code appears to be working correctly.
Is this something I should try to fix and if so where do I look for definitions that are external to our source?
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Na,
I've investigated another issue regarding the multiply-defined warning message.
The application created under MPC55xx/56xx V2.9 was build with any problem/warning.
then the customer moved the project under V2.10 and he got lot of multiply-defined warning message.
In fact the message was introduced by a compiler/linker improvement.
The feature was not checked on V2.9.
to investigate the problem we need more info:
- what is the development tool used ?
- can you please provide us the example project ?
Regards
Pascal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Na,
I got 3 errors:
Error : the file 'core_watchdog_init.h' cannot be opened
main.c line 3 #include "core_watchdog_init.h"
Error : the file 'core_watchdog_srvc_routine.h' cannot be opened
main.c line 4 #include "core_watchdog_srvc_routine.h"
Could not find or load the file "swt_init.c" for target "RAM" for project "Second_BTL.mcp".
I got info from Compiler team regarding the multiply-defined.
+++++++++++++++++++++++++
The linker behavior was changed in 2.10 to warn on duplicate symbols.
Use
-w noSymRedef # suppress Symbol Redefined warnings to suppress all redefined warnings.
This is command line option.
For MCU 10.x this can be passed on linker other flags(Settings -> PowerPC Linker -> General -> Other Flags).
For V2.10 there is no way to suppress these warnings.
+++++++++++++++++++++++++
Unfortunately there is no way to suppress the warning under V2.10.
Regards
Pascal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Thank you for your post, however please consider moving it to the right community place (e.g. Other Freescale Solutions or CodeWarrior Development Tools ) to get it visible for active members.
For details please see general advice Where to post a Discussion?
Thank you for using Freescale Community.