If we get an error message when compiling C extension program, like the following message:
Code:
./src/interrupt-c-ext.o:(.rodata+0x4): undefined reference to `_nds32_vector_01'
./src/interrupt-c-ext.o:(.rodata+0x8): undefined reference to `_nds32_vector_02'
./src/interrupt-c-ext.o:(.rodata+0xc): undefined reference to `_nds32_vector_03'
./src/interrupt-c-ext.o:(.rodata+0x10): undefined reference to `_nds32_vector_04'
......
./src/interrupt-c-ext.o: In function `_nds32_vector_00':
(.nds32_vector.00+0x0): undefined reference to `_nds32_reset'
./src/interrupt-c-ext.o: In function `_nds32_vector_09':
(.nds32_vector.09+0xa): undefined reference to `_nds32_i_ps_nn'
./src/interrupt-c-ext.o: In function `_nds32_vector_10':
(.nds32_vector.10+0xa): undefined reference to `_nds32_i_ps_nr'
./src/interrupt-c-ext.o: In function `_nds32_vector_15':
......
We should add a library to solve this problem.
nds32le-elf-gcc -O0 -nostartfiles -static -T"../nds32-c-ext.ld" -o "demo-int-c-ext.adx" ./src/init-default.o ./src/init-soc.o ./src/interrupt-c-ext.o ./src/main-c-ext.o ./src/uart.o
-lnds32_isrFinished building target: demo-int-c-ext.adx
In AndeSight, we can add the option in ld setting.
Attachment:
1.gif [ 18.24 KiB | Viewed 6576 times ]