Jump to content
  • 0

vivado 18.2 microblaze SDK get undefined reference to main.c error. Following microblaze tutorial


gman9500

Question

HI, I am following the Microblaze tutorial located

https://reference.digilentinc.com/vivado/getting-started-with-ipi/2018.2 andI am using the same version, but whenI try to load theProgram or run clean build or regenerate BSP I get 

'Building target: ipi-gsg.elf'
'Invoking: MicroBlaze gcc linker'
mb-gcc -Wl,-T -Wl,../src/lscript.ld -L../../ipi-gsg_bsp/microblaze_0/lib -mlittle-endian -mcpu=v10.0 -mxl-soft-mul -Wl,--no-relax -Wl,--gc-sections -o "ipi-gsg.elf"  ./src/main.o   -Wl,--start-group,-lxil,-lgcc,-lc,--end-group
c:/xilinx/sdk/2018.2/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/7.2.0/../../../../microblaze-xilinx-elf/lib/le/crtinit.o: In function `_crtinit':
(.text+0x78): undefined reference to `main'
collect2.exe: error: ld returned 1 exit status

make: *** [ipi-gsg.elf] Error 1

 

I'm copying and pasting that example C program in that tutorial

I am doing run as LAunch on Hardware   (System DEbugger)  to load it

which gives me this pop up as well

"executables selected for download following on to the following processors doesn't exist or incorrectly specified. Do you wish to ignore them and process? 1. microblaze_0"

I'm using a basys 3 board

 

How do I fix this? I don't see what is not being referenced to main.c

I've also tried regenerate which didn't do anything

Thanks

Daryl

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Answering my own question

I just noticed that the entire C code was all light blue instead of color coded.  like it was all commented out

Then I  realized there was a /* at the top and   */ at the bottom

I have no idea where those came from as they aren't in the code I copied.

Works now

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...