these payloads may not work , i have no clue honestly i attached them , also there are 2 helper py scripts that might work with some of these payloads
25 lines
627 B
C
25 lines
627 B
C
#include "target_config.h"
|
|
#define START_ADDR 0x00000000
|
|
#define WDT_EN 0x60005000
|
|
#define WDT_SEL 0x60005008
|
|
#define TMR_WDT_RESTART 0x6000501c
|
|
|
|
typedef int (*usb_send_ptr)(void *buffer, unsigned int length,
|
|
unsigned int *transferred);
|
|
usb_send_ptr usb_send_raw = (usb_send_ptr)0x000035e5;
|
|
|
|
void _start() {
|
|
|
|
unsigned char *source = (unsigned char *)0x40000000;
|
|
unsigned int transferred = 0;
|
|
|
|
for (int i = 0; i < 100; i++) {
|
|
*(volatile unsigned int *)0x6000501c = 0xcafe;
|
|
|
|
usb_send_raw(source + (i * 64), 64, &transferred);
|
|
|
|
for (volatile int d = 0; d < 200000; d++)
|
|
;
|
|
}
|
|
}
|