PicoMite V6.01.00 betas


Author Message
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 1109
Posted: 02:40am 10 Oct 2025      

Hi Peter,
Any love for this?
POKE HARDFAULT
Allows generating a HARDFAULT from code to allow testing of startup/recover.


MM_Misc.c

void cmd_poke(void)
...
...
   } else if((p=checkstring(cmdline, (unsigned char *)"HARDFAULT"))){
    //int *harderror = NULL; *harderror = 10;  // Generate hard error
    //*(volatile uint32_t*)0x10000 = 1;        //BUS errror
    asm volatile (".word 0xf7f0a000\n");       //Undefined instruction

   }
   else      
   {
       getargs(&cmdline, 5, (unsigned char *)",");
       if ((p = checkstring(argv[0], (unsigned char *)"BYTE")))

...