dcload-ip icon indicating copy to clipboard operation
dcload-ip copied to clipboard

dcload-ip crashes when setting MMUCR

Open pcercuei opened this issue 8 months ago • 0 comments

As the title says. This does not happen with dcload-serial.

#include <stdint.h>
#include <stdio.h>

#define SET_MMUCR(URB, URC, SQMD, SV, TI, AT) \
    do { *mmucr = ((URB) << 18) \
                      | ((URC) << 10) \
                      | ((SQMD) << 9) \
                      | ((SV) << 8) \
                      | ((TI) << 2) \
                      | ((AT) << 0); } while(0)

static volatile uint32_t * const mmucr = (uint32_t *)(0xff000010);

int main(int argc, char **argv)
{
	fprintf(stderr, "Hello\n");

	SET_MMUCR(0x3f, 0, 0, 1, 1, 1);

	fprintf(stderr, "World\n");

	return 0;
}

pcercuei avatar Jun 21 '24 11:06 pcercuei