µTasker Forum > µTasker general

Kinetis K60: code imported from TWR-K60D100M to circuit using MK60DX256VLL10

(1/2) > >>

ABBASID:
I have successfuly run Keil MDK codes provided in "SDK_2.2.0_TWR-K60D100M_board" on TWR-K60D100M-KIT. Now I am trying to write codes for my own design circuit which uses MK60DX256VLL10. In sample code of GPIO, PORTA11 in TWR-K60D100M is used to toggle LED on/off. Now in my own design circuit, same pin PORTA11 is used to toggle LED on/off. The problem is that the code is built successfuly in KEIL MDK 5.34 but when I press the debug button, the code debugs but instead of normal procedure (in which when debug is pressed, code enters in debug mode and you have to press RUN to run the code on your target ) the code shows RUN button as gray (as if without pressing the RUN button, code has entered RUN mode) but nothing happens on design circuit and when I press STOP button, the error appears ( error message is typed in bold as below to distiguish from my question)

Cannot access memory @0x2000fff8, Read, Acc Size: 4 Byte

Cannot access memory @0x2000fffc, Read, Acc Size: 4 Byte

'

'

'

Cannot access memory @0x20011f94, Read, Acc Size: 4 Byte


I have tried to undesrstand this error. 20011f94 minus 2000fff8 = 1F9C = 8092 (decimal) = 8K memory.


Can anybody help me understand this error. Are there any special setting to change in code when exporting from TWR-K60D100M to  MK60DX256VLL10 (apart from target selection in Keil MDK). Project/Code is attached whic is very simple to understand so please have look at it.

mark:
Hi

The K60DN512VMD10 on the TWR-K60D100M has 512k Flash and 128k SRAM, whereby the SRAM occupies the memory space 0x1fff0000 ... 0x2000ffff

Your HW has the K60DX256, which has 256k Flash and 64k SRAM, where the SRAM occupies the memory space 0x1fff8000 ... 0x20007ffff

Any reads outside of SRAM space will result in an error. The addresses signalling errors are from 0x2000fff8 which is not in the memory range of the K60DX256 (although is in the range of the K60DN512VMD10 ).

Therefore it is normal that it errors if you use the same memory layout as the K60DN512VMD10 and means that you need to adjust your linker script file to match the part being used.

Regards

Mark

ABBASID:
When target is selected in Keil MDK it automatically adjust these things. Is this not the case? Attached two pictures show that the difference which you are suggesting is there when MK60DN512VMD10 is selected (which is used in development kit) as comapred to MK60DX256VLL10 (used in my circuit). Are there any other settings which needs changing in the code? Is this setting in Keil MDK's target selection enough? If there are changes needed to be done in the code, would you be so kind to point me in that direction.

mark:
Hi

You need to check the linker setting because it defines whether these settings are used or setting from the link script instead.

Regards

Mark

ABBASID:
Where can I find these settings in Keil MDk software?

Navigation

[0] Message Index

[#] Next page

Go to full version