Use DS-5 MPS2_CM33 FVP in non-secure mode ?

Hi,

  I try to run test program on DS-5 MPS2_CM33 FVP.

  The program is as below.

  I also set the FVP parameters:

    cpu0.SAU=0

    cpu0.SAU_CTRL.ALLNS=1

  After switching non-secure mode successfully, I loaded test program to 0x800.

  But FVP seems always execute every instruction as NOP, only PC increment by 2.

  No branch/registers update operations are executed correctly.

  What parameters do I need to configure FVP to make it work correctly in non-secure mode ? 

  Thank you for your help

    

#include <arm_cmse.h>
#include <stdio.h>

typedef int __attribute__((cmse_nonsecure_call)) nsfunc(void);

int nonsecure_init() {
*(volatile unsigned int *)0xE002ED08=0x30000000;
volatile uint32_t *vtor = (volatile uint32_t *) 0x30000000;

//__TZ_set_MSP_NS(vtor[0]);
vtor[0] = 0x30100000;
vtor[1] = 0x00002000;

nsfunc *ns_reset = (nsfunc*)(vtor[1]);
ns_reset();
}

int main() {
nonsecure_init();

printf("ERROR:Should not return here!\n");

return 0;
}

More questions in this forum