hello,
While I am trying to execute a simple bubble sort program in c as provided as an example in the arm development studio IDE, I am facing 3 errors like as shown below: (Target and source must be capability)
/bubblesort.c:45:37: error: invalid target type 'uint32_t *' (aka 'unsigned int *') for __cheri_tocap: target must be a capability seq_t sequence = (__cheri_tocap seq_t)malloc(sizeof(uint32_t) * SEQ_LEN);
../bubblesort.c:57:33: error: invalid source type 'uint32_t *' (aka 'unsigned int *') for __cheri_fromcap: source must be a capability free((__cheri_fromcap void*)sequence);
/bubblesort.c:70:6: error: conflicting types for 'print'void print (seq_t __cheri_input sequence, int size) {
N.B: I am using LLVM 13.0.0 with Morello support.
yes I have added that in the initialisation.ds file with the content
set semihosting enabled onset semihosting heap-base 0x80400000set semihosting heap-limit 0x80800000set semihosting stack-limit 0x80800000set semihosting stack-base 0x81000000
but pointed it to the Run target initialization debugger script. But the issue remains. As I step through it moves into an address as shown in the disassembly. The program is running as it shows but I couldn't see the output on the console
I made a fresh post describing the problem in this link
community.arm.com/.../baremetal-program-execution-on-arm-morello-board