Hi,
Sorry for reviving this topic again. I am doing this bcz my query is related to all the changes suggested here
I am facing sokme difficulties in project.AddtoExtension command in wizard.script file.
What I want is : (within cbp file of generated project from wizard)
<remote_debugging>
<options conn_type="0" serial_baud="115200" additional_cmds="monitor halt;monitor flash erase_address 0x0 0x10000;load bin/Debug/rth.elf;file bin/Debug/rth.elf;monitor halt; />
</remote_debugging>
<remote_debugging target="Debug">
<options conn_type="0" serial_baud="115200" additional_cmds="monitor halt;monitor flash erase_address 0x0 0x10000;load bin/Debug/rth.elf;file bin/Debug/rth.elf;monitor halt; />
</remote_debugging>
<remote_debugging target="Release">
<options conn_type="0" serial_baud="115200" additional_cmds="monitor halt;monitor flash erase_address 0x0 0x10000;load bin/Release/rth.elf;file bin/Release/rth.elf;monitor halt; />
</remote_debugging>
To get this as output, I use one of the suggestion mentioned earlier - To use "scriptadd" in defining path, like this
local additional_commands = _T("monitor halt\n") +
_T("monitor flash erase_address 0x0 0x10000\n") +
_T("load bin/Debug/") + projectName + _T(".elf\n") + // load /bin/debug/ will not work
_T("file bin/Debug/") + projectName + _T(".elf\n") +
_T("monitor halt\n");
local additional_commands1 = _T("monitor halt\n") +
_T("monitor flash erase_address 0x0 0x10000\n") +
_T("load bin/Release/") + projectName + _T(".elf\n") + // load /bin/debug/ will not work
_T("file bin/Release/") + projectName + _T(".elf\n") +
_T("monitor halt\n");
project.AddToExtensions(_T("debugger/scriptadd/remote_debugging/options:additional_cmds=") + additional_commands);
project.AddToExtensions(_T("debugger/scriptadd/remote_debugging:target=Release"));
project.AddToExtensions(_T("debugger/scriptadd/remote_debugging/options:additional_cmds=") + additional_commands1);
The problem is whenever I do this,
project.AddToExtensions(_T("debugger/scriptadd/remote_debugging:target=Release"));
project.AddToExtensions(_T("debugger/scriptadd/remote_debugging/options:additional_cmds=") + additional_commands1);
Above function replaces the below function
project.AddToExtensions(_T("debugger/scriptadd/remote_debugging/options:additional_cmds=") + additional_commands);
Now I can only see 1 of above.
Is there any method that I can used to get the desired output?
Outcome I am getting is
<remote_debugging target="Release">
<options conn_type="0" serial_baud="115200" additional_cmds="monitor halt;monitor flash erase_address 0x0 0x10000;load bin/Release/rth.elf;file bin/Release/rth.elf;monitor halt; />
</remote_debugging>
Just for Reference, I tries to use this solution, available here only a few comments before
Something like this?
You could then add something to "debugger/scriptadd/x", which would then be converted to "debugger/x" on first save (or load)
Yes it's a hack, but minimally intrusive, and the whole AddToExtension interface seems a bit q&d to me...
* cb_dbgscradd.patch
Is anyone can help me with this? Any possible solution?