-
Notifications
You must be signed in to change notification settings - Fork 83
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
Include extenal C runtime files in the CMake flow #336
Comments
Well catched, this function should be restored asap |
After these lines in the SET(LIB_CRT_P "${SOURCE_PATH}device/lib/crt/")
SET(LIB_VCTR_P "${LIB_CRT_P}vectors.S") We should be considering whether the application is an external app.
If both paths are equal, then the app is internal, if not, its external. Once you have determined that, we should include an The # specify the C standard
set(COMPILER_LINKER_FLAGS "\
-march=${CMAKE_SYSTEM_PROCESSOR} \
-w -Os -g -nostdlib \
-DHOST_BUILD \
-D${CRT_TYPE} \
-DportasmHANDLE_INTERRUPT=vSystemIrqHandler\
") |
This should be fixed and closed due to #358 |
@danivz , can you please close this issue and tell us if the solution works? |
@JoseCalero you sure #358 would fix this? It did not implement what we discussed in this comment |
You are right, we are missing the external, I will do it asap |
Being fixed in #364 |
Update code from upstream repository https://github.com/esl- epfl/x-heep.git to revision df569a88fc7eaa447645262f0d3a76dd22c519f7 * enable mcycle in matadd examples (esl-epfl/x-heep#413) (Davide Schiavone) * reduce FPGA frequencz to 15MHz to accomodate FPU (esl- epfl/x-heep#404) (Davide Schiavone) * fix cv32e4 verilator waivers (esl-epfl/x-heep#402) (Davide Schiavone) * fix GPIO HAL by adding selection of GPIO domain (esl- epfl/x-heep#385) (Davide Schiavone) * update vendor fpu_ss (esl-epfl/x-heep#397) (Davide Schiavone) * fix cv32e40px fpga (esl-epfl/x-heep#396) (Davide Schiavone) * add fpu over cv-x-if in tb (esl-epfl/x-heep#392) (Davide Schiavone) * SEGGER Embedded Studio support for X-HEEP (esl-epfl/x-heep#370) (jmiranda) * Squashed commit of the following: (jmiranda) * Always use `MCU_CFG` variable in `Makefile` (esl-epfl/x-heep#391) (Michele Caon) * update cv32e40p (esl-epfl/x-heep#389) (Davide Schiavone) * update cv32e40px (esl-epfl/x-heep#388) (Davide Schiavone) * use jtag i/o from harness when not using jtag dpi (esl- epfl/x-heep#379) (Davide Schiavone) * Fix esl-epfl/x-heep#336 (esl-epfl/x-heep#364) (JuanSapriza) * add minimal configuration for mcu-gen (esl-epfl/x-heep#378) (Davide Schiavone) * PLIC handlers array (esl-epfl/x-heep#363) (JuanSapriza) * Update README.md (jmiranda) * Choose linker compiler and sim/nosim in test_all.sh (esl- epfl/x-heep#359) (JuanSapriza) * Modified the two target header files so that they add a define with a value. That is then used to modify the PRINTF logic in all apps (esl-epfl/x-heep#361) (JuanSapriza) * add obi fifo stage to/from peripherals (esl-epfl/x-heep#200) (Davide Schiavone) * added support for clock-gating external subsystems (esl- epfl/x-heep#354) (Simone Machetti) * Improved the comments on the eXtendingHEEP readme (esl- epfl/x-heep#360) (JuanSapriza) * Modified the way of realizing if an app is external or not (JuanSapriza) * add script to simulate all apps (esl-epfl/x-heep#341) (JuanSapriza) * [app] fix APPs on flash_exec (esl-epfl/x-heep#357) (Davide Schiavone) * adding attributes and mux pad parameters in mcu-gen (esl- epfl/x-heep#349) (Davide Schiavone) * change signal names in power manager to reflex polarity (esl- epfl/x-heep#352) (Simone Machetti) * fix power gating core app (esl-epfl/x-heep#355) (Davide Schiavone) * add cv32e40px (esl-epfl/x-heep#353) (Davide Schiavone) * moved fpnew in its own directory (esl-epfl/x-heep#351) (Davide Schiavone) * update cv32e40p divider (esl-epfl/x-heep#350) (Davide Schiavone) * fix external pad gen (esl-epfl/x-heep#346) (Davide Schiavone) * fix mcu-gen (esl-epfl/x-heep#345) (Davide Schiavone) * update GPIO driver (esl-epfl/x-heep#246) (Hossein Taji) * fix interleaved bus (esl-epfl/x-heep#340) (Daniel Vázquez) * fix esl-epfl/x-heep#338 (esl-epfl/x-heep#339) (Davide Schiavone) * Initialized variables to 0 inside functions. Removed printf comments (esl-epfl/x-heep#334) (JuanSapriza) * made the dma_is_ready() function non-optimizable at all. (esl- epfl/x-heep#333) (JuanSapriza) * fix SPI apps (esl-epfl/x-heep#327) (Davide Schiavone) * Include x-heep.h to all apps that need it (esl-epfl/x-heep#329) (JuanSapriza) * Added soc_ctrl-reg_top warning to waiver (esl-epfl/x-heep#326) (JuanSapriza) * fix several applications (esl-epfl/x-heep#325) (Davide Schiavone) * Tries to use cmake3. If that is not available, go ahead with cmake (esl-epfl/x-heep#323) (JuanSapriza) * Improve the timing of cv32e40x by removing the debug triggers (esl- epfl/x-heep#324) (David Mallasén Quintana) * refactoring of examples (esl-epfl/x-heep#322) (JuanSapriza) * expose internal master ports to external devices (esl- epfl/x-heep#268) (Michele Caon) Signed-off-by: Juan Sapriza <juan.sapriza@epfl.ch>
The current CMake software compilation flow doesn't support external C runtime files.
Following the instructions in eXtending_HEEP.md I have:
I want to include
external_crt0.S
in https://github.com/esl-epfl/x-heep/blob/8f2351053dd240d4e6a01ac90cfcd49fb78a747c/sw/CMakeLists.txt#L169C1-L172C37. However, If I hardcode the CRT file path inLINKED_FILES
the compilation fails becausefll_regs.h
andheepie.h
are included inexternal_crt0.S
and the compiler can't find these headers.I also noticed that in
crt0.S
the macroEXTERNAL_CRT0
isn't set automatically when there is a external CRT file: https://github.com/esl-epfl/x-heep/blob/8f2351053dd240d4e6a01ac90cfcd49fb78a747c/sw/device/lib/crt/crt0.S#L44C1-L46C7The text was updated successfully, but these errors were encountered: