Hi!
You can see the 2 code fracments that causes the different behaviour. As you can see, the only difference is that I increase the counter in the eror free case, what I don t do in the errornous case. But the error happens before I reach my main and also this code fracment.
I start to follow David´s hint,
I changed my entry point and started to step at the beginning. That s very interesting.
First of all the following Assembler Code is executed:
__boot:
mrs r0, MSP
msr PSP, r0
; switch to proccess stack (PSP)
mrs r0, CONTROL
orr r0, r0, #2
msr CONTROL, r0
b __iar_program_start
That s very interesting cause I don t use IAR but CW 10.1 and I followed all getting started instructions.
After executing the branch I got the following message (either in the error free and the errornous state and in a MQX example):
Can't find a source file at "D:\workspace\ARM_CORTEXM\ARM_CortexM_Component\ewl\EWL_Runtime\Runtime_ARM\Source\startup.c"
Locate the file or edit the source lookup path to include its location.
That s strange, cause that path doesn t exist and I cannot find any location where I can specify the path to a startup.c file and the path isn t specified at the project properties path and symbol menu, too.
Cause I got the message in every case I step further on (it s still possible), but I got the message several times and the following message once:
Can't find a source file at "D:\workspace\ARM_CORTEXM\ARM_CortexM_Component\ewl\EWL_Runtime\Runtime_ARM\Source\__arm_eabi_init.c"
Locate the file or edit the source lookup path to include its location.
So I step further on. First I reach this Assembler code:
__iar_program_start:
1fff8f00: ldr r3,[pc,#0x4]
1fff8f04: bx r3
Then I jump to this Assmebler Code:
__thumb_startup:
1fff8f0c: bl __init_registers (0x1fff8ec8); 0x1fff8ec8
1fff8f10: bl __init_hardware (0x1fff6cac); 0x1fff6cac
1fff8f14: ldr r0,[pc,#0x3a]
1fff8f18: cmp r0,#0
And her s the diffrence between the error free and the errornous code.In the error free case I step over the 2 branches at the beginning of _thumb start, at the errornous case I take the second jump (bl __init_hardware (0x1fff6cac); 0x1fff6cac) and jump to a position 4006c000: andeq r0,r0,r0,lsl #8
which causes the message
No source available for " 0x4006C000 (0x4006C000)()
Very starnge, that I jump to 4006c000 cause the assembler looks like a jump to 0x1fff6cac
And very strange that the different jump behavior between the error free and the errornous case comes from a useless instruction.
At the moment I have several code fracments that causes the same effect. So I have several working places where I cannot program the code I want because of this strange effect.
I hope you can help me
Ulf