Hi Guys sorry but this is my first time trying to setup ARM GNU On my Mac-OS Apple Sillicon M1. I am having trouble with it as the linker fails to find the commands listed in the screenshot
So far i have installed ARM GNU 12.3
ARM GNU CMSI 5.9.0
this is the main.c File
#include "LPC845.h"
void SystemInit(void)
{
SYSCON->FROOSCCTRL |= (1 << 17);
SYSCON->FRODIRECTCLKUEN = 0;
SYSCON->FRODIRECTCLKUEN = 1;
SYSCON->SYSAHBCLKCTRL0 |= (1 << 20);
GPIO->DIRSET[1] = 0x00000007;
GPIO->SET[1] = (1 << 0);
GPIO->SET[1] = (1 << 1);
GPIO->SET[1] = (1 << 2);
}
void delay(uint32_t del)
{
uint32_t i;
for (i = 0; i < del; i++)
{
__asm("nop");
}
}
int main(void)
{
while (1)
{
GPIO->NOT[1] = (1 << 1);
delay(100000);
}
return 0;
}
I am using the following command to run the main.c
arm-none-eabi-gcc -O0 -g3 -mcpu=cortex-m0plus -mthumb -I..Include main.c
startup_LPC845.S "-Wl,--no-warn-rwx-segments" -lc -lrdimon -T LPC845_flash.ld -o
main.el
and then the followin command for OpenOCD
..OpenOCDopenocd -s ..OpenOCDscripts -f interfacecmsis-dap.cfg -f target
LPC84x.cfg -c 'adapter speed 2000' -c "program main.elf reset exit"
so far i have tried /done the following
exit.c:(.text+0x18): undefined reference to `_exit’ when using arm-none-eabi-gcc