Thursday, December 18th 2014, 8:33am UTC+1

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to SEGGER Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

hpgisler

Beginner

Date of registration: Apr 25th 2012

Posts: 2

1

Thursday, April 26th 2012, 9:41am

Undefined Weak Reference in mapfile / simulator debugging not possible

Hello

I try to run the segger embOS example for STM32F207 (MB786) in simulator mode with keil UV.
Versions used:
* embOS_CortexM_Keil_Trial_V3861

* Keil UV 4.5

Compilation works alright, however if I try to start the debugger, it tells me:


Load "F:\\F\\work\\Segger\\embOS_CortexM_Keil_Trial_V3861\\Start\\BoardSupport\\ST\\STM32F207_MB786\\Output\\Debug\\Start_STM32F207_MB786.AXF"
*** error 65: access violation at 0x0000000C : no 'read' permission


Obviously, there is no map entry for various parts of the memory telling the debugger that it is ok to access that memory. Why? I've further tried to add these map entries for the debugger, however, this does not work as code seems to be missing and the simulator just runs through empty code memory space. (using cpu cycles but doing nothing).

I suspect that this might have to do something with weak pointers to OS functions so that the linker does not include them into the binary.

In the map file there is a section looking like this:


Global Symbols

Symbol Name Value Ov Type Size Object(Section)

BuildAttributes$$THM_ISAv4$P$D$K$B$S$PE$A:L22UL41UL21$X:L11$S22US41US21$IEEE1$IW$USESV6$~STKCKD$USESV7$~SHL$OTIME$ROPI$EBA8$UX$STANDARDLIB$REQ8$PRES8$EABIv2 0x00000000 Number 0 anon$$obj.o ABSOLUTE
__ARM_use_no_argv 0x00000000 Number 0 start_ledblink.o ABSOLUTE
__ARM_exceptions_init - Undefined Weak Reference
__alloca_initialize - Undefined Weak Reference
__cpp_initialize__aeabi_ - Undefined Weak Reference
__cxa_finalize - Undefined Weak Reference
__rt_locale - Undefined Weak Reference
__sigvec_lookup - Undefined Weak Reference
__user_heap_extent - Undefined Weak Reference
_atexit_init - Undefined Weak Reference
_call_atexit_fns - Undefined Weak Reference
_clock_init - Undefined Weak Reference
_fp_trap_init - Undefined Weak Reference
_fp_trap_shutdown - Undefined Weak Reference
_get_lc_collate - Undefined Weak Reference
_get_lc_ctype - Undefined Weak Reference
_get_lc_monetary - Undefined Weak Reference
_get_lc_numeric - Undefined Weak Reference
_get_lc_time - Undefined Weak Reference
_getenv_init - Undefined Weak Reference
_handle_redirection - Undefined Weak Reference
_mutex_acquire - Undefined Weak Reference
_mutex_free - Undefined Weak Reference
_mutex_release - Undefined Weak Reference
_rand_init - Undefined Weak Reference
_signal_finish - Undefined Weak Reference
_signal_init - Undefined Weak Reference
__Vectors_Size 0x00000184 Number 0 startup_stm32f2xx.o ABSOLUTE
Stack_Size 0x00000400 Number 0 startup_stm32f2xx.o ABSOLUTE
__Vectors 0x08000000 Data 4 startup_stm32f2xx.o(RESET)
__Vectors_End 0x08000184 Data 0 startup_stm32f2xx.o(RESET)
__main 0x08000185 Thumb Code 8 __main.o(!!!main)
....


But perhaps I'm totally mistaken?

However, does anyone know what is the reason for the simulator failing and how to solve this?

Thank's very much for any insight.
Regards
Hanspeter

Similar threads