Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NOC library does not compile on LLVM2 #156

Closed
Tracked by #155
Emoun opened this issue Oct 2, 2024 · 3 comments
Closed
Tracked by #155

NOC library does not compile on LLVM2 #156

Emoun opened this issue Oct 2, 2024 · 3 comments

Comments

@Emoun
Copy link
Member

Emoun commented Oct 2, 2024

On the llvm2 branch the NOC library does not compile using the make APP.. compile command, throwing a linking error saying various symbols defined in the c/cmp/nocinit and application itself cannot be found.

The issue is caused by the compilation process, which currently hides all symbols defined by the application from any library code. Since c/cmp/nocinit is by default compiled with the application as if it was part of the application, anything defined in it is hidden from the libnoc code, resulting in the linking error.

I propose the solution is to move nocinit.c into the noc library itself, thus fixing the linking issues. This is a bit involved as this file is generated by poseidon and the make gen patmos command. The file would also have to include the NOC_MASTER symbol, which is currently define by each application individually (why?).

@torurstrom could you take a look at this?

@Emoun Emoun mentioned this issue Oct 2, 2024
42 tasks
@Emoun Emoun changed the title arg2_test NOC library does not compile on LLVM2 Oct 2, 2024
@Emoun
Copy link
Member Author

Emoun commented Oct 2, 2024

Even if this is fixed, the argo2_test program does not work on the FPGA. I don't know exactly the reason for this, but this should be investigated after fixing the above issue.

@torurstrom
Copy link
Contributor

The issue with argo2_test (and other programs using argo) on the FPGA was with downloader (patserdow). The new compiler generates more segments in the ELF file, and not all have the LOAD type. I fixed this (d33445b) by only downloading LOAD segments, but perhaps we need to actually think about what to do with the different segment types.

@torurstrom
Copy link
Contributor

nocinit.c has moved to libnoc/nocinit.c, and NOC_MASTER to libnoc/nocmaster.c. We no longer (at least for now) support libnoc in bootable apps through the default Makefile, because the bootable app is generated before Patmos, which is generated before Argo, which generates nocinit.c.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants