How memtool manages to change the BMI value?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
ipek
Level 4
Level 4
25 replies posted 10 replies posted 10 questions asked
Hello friends and future myself,

Before my questiom I'd like to say that this is one of the most deserted forums that I have ever seen.
Half of my questions are solved by me and the other half is replyless.
Infineon support is also deserted I think. The only response I got from them is, "its been a long time since you opened this case, is it still valid?"
So if you are planning to use infineon processors some of your products, please consider that you may not get any help when you need it.

Here is my question,
As I mentioned in my other posts, I am trying to make an xcm1400 with asc bsl mode to run my code and change its BMI to debug mode. But I have to do this without using memtool.
But how? I send necessary mesaages and my application binary but it wont work because I cannot make this asc bsl to run my code.
so how memtool does it? How does it change the BMI? Is there a simple sequence to do that, without implementing a whole flash loader?

Since there will be no answers and I am alone in this section of the forum, I hope I will solve this one quickly!
Bests,
Ipek
0 Likes
1 Solution
Vasanth
Moderator
Moderator
Moderator
250 sign-ins 500 solutions authored First question asked
Hello Ipek,

Sorry to hear that there has been delays in resolving the issues. We will try to help you solve them. Kindly check this application note for you reference.
Kindly check the host provided with it for reference.

Best Regards,
Vasanth

View solution in original post

0 Likes
6 Replies
Vasanth
Moderator
Moderator
Moderator
250 sign-ins 500 solutions authored First question asked
Hello Ipek,

Sorry to hear that there has been delays in resolving the issues. We will try to help you solve them. Kindly check this application note for you reference.
Kindly check the host provided with it for reference.

Best Regards,
Vasanth
0 Likes
ipek
Level 4
Level 4
25 replies posted 10 replies posted 10 questions asked
Hello Vasanth,

Thank you for your reply, this isn't happening quite often:)
I checked that document and wrote a program to perform that sequence.
I can successfully do handshake and send my application file. But it is not running.
I think the reason is the default startup code and linker script. I have modify them so my program can run in the RAM instead of Flash.
I hope to find a linker script(and startup code if necessary) example for ram run.
I am sure somebody had did this before and since this linker script files are not very simple to modify I would prefer to not invent the wheel again 🙂
0 Likes
Vasanth
Moderator
Moderator
Moderator
250 sign-ins 500 solutions authored First question asked
Hi Ipek,

Did you follow the following instruction on the application note ?

The Flash Loader program must be located in the SRAM starting at 0x20000200, because the Flash
Loader program can only run from SRAM. Therefore the default linker script file generated from DAVE4
cannot be used in the Flash loader project, because the default linker script file locates the codes in Flash
starting at 0x10001000. The linker script file that locates the codes into SRAM is provided in the
XMC1x_ASCLoader.ld folder. To change the linker script file go to project properties:
 Go to Settings->ARM-GCC C Linker->General->Script file (-T)
 Open “Browse…” to import the file XMC1x_ASCLoader.ld into the field



Example code for your reference

Best Regards,
Vasanth
0 Likes
ipek
Level 4
Level 4
25 replies posted 10 replies posted 10 questions asked
Hi Vasanth,

Yes I did. There are two linker scripts in there.
1. XMC1x_ASCLoader.ld(in XMC1x_ASCLoader project)
Written/generated for XMC1300 8 years ago. My mcu is XMC1400 and even if I would be using 1300, I am not sure that this will work. Because when I generate one for XMC1300 with latest DAVE, generated linker script is quite different than this one.
I still tried, doesn't work.
2. linker_script.ld (XMC1300_Blinky). This one a bit newer than the other one but still for XMC1300. And doesn't worked when I tried.
Maybe with some modifications they could work but as I said before, altering a linker script is not the easiest thing to the and I shouldnt be reinventing the wheel for such a common stuff....
Best regards, İpek
0 Likes
Vasanth
Moderator
Moderator
Moderator
250 sign-ins 500 solutions authored First question asked
Hello Ipek,

linker_script.ld (XMC1300_Blinky) is the linker for the project loaded through the host application and note the loader. XMC1x_ASCLoader.ld is the linker script to be referred which stores the code in SRAM.

Best Regards,
Vasanth
0 Likes
ipek
Level 4
Level 4
25 replies posted 10 replies posted 10 questions asked
Hello,
Yes, and as I mentioned 4 or 5 times they are both linker scripts for XMC1300. And all of my boards have XMC1400 in them. Not XMC1300.
Are you deliberately ignore that I need stuff for XMC1400 not XMC1300? Or am I missing something?
Because I keep mentioning XMC1400 in all of my post but you keep recommending me things for XMC1300 which is a different version with many technical differences.
Believe me if this files and codes would be working for XMC1400, I wouldnt be in here begging for help 🙂
0 Likes