Hi Jorge,
The solution to your issue is a bit more complicated. You basically want to have an application that runs even if the debugger is not connected. Correct?
If yes you need two things:
1) Make sure that you have a chip that has the SBAF enabled from factory. If your chip does not have the sBAF than is virtually impossible to run the application without debugger because the core that is started by default is the M7-HSE and there is no-one telling the target Core (the M7 or M33) when to start and where is the start address for that core.
2) If the chip has the SBAF then the default boot_header there should indicate the start address and which core should be started. As far as I know the default core should be M33_core0. Now, if this is true, then in order to flash a new application for the M33_core0 you need to run s32k2xx-sbaf-cm33.cmm. This cmm will update the boot_header and will do an initial start of the M33_core.
If you build the application for M7 core, then you need to run s32k2xx-sbaf-cm7.cmm.
Troubleshooting:
1) After a initial flash for one core, when changing from one core to an other you need to remember for which core you previously did the flashing. The reason for this is that the T32 can only attach to a running core in order to flash the new application and there is no way (that I know off) to determine which core is currently running. Basically this is a trial and error phase. You need to change the System.CPU command from line ~40 so that you will attach to the proper core. So (for example) if the current code was flashed for M7 and you want to change it to M33, you need to update the s32k2xx-sbaf-cm33.cmm so that the T32 will initially attach to the running M7 core and you do this by changing line 39 from: SYStem.CPU S32K2-M33-0 to SYStem.CPU S32K2-M7. (Default value is M33-0 since its supposed that the boot_header is default configured to M33_0.
You need to do a similar activity, but on the s32k2xx-sbaf-cm7.cmm when you want to change from M33 to M7.
2) If no core was started (except M7-HSE) that you need to attach to HSE core in order to do a flashing operation.
This is done in a similar way as for either M33 and M7 core (as described above) but you also need un-comment the HSE watchdog disable procedure from lines 72, 73 and 74.
Please let me know if you are running into any issues.... Just email me :smileyhappy:
BR,
Alin