Skip to content

Commit

Permalink
Fix RF project build fail
Browse files Browse the repository at this point in the history
add build parameter: -march=rv32imac_zicsr
  • Loading branch information
ChnMasterOG committed Jul 24, 2024
1 parent 5c2af04 commit 503cbb6
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 13 deletions.
9 changes: 3 additions & 6 deletions mounriver_project/RF_CH582M/.cproject
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.warnings.uninitialized.1738743991" name="Warn on uninitialized variables (-Wuninitialized)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.warnings.uninitialized" useByScannerDiscovery="true" value="false" valueType="boolean"/>
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.codemodel.563095473" name="Code model" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.codemodel" useByScannerDiscovery="false" value="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.codemodel.any" valueType="enumerated"/>
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.isa.atomic.325747089" name="Atomic extension (RVA)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.isa.atomic" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.rvGcc.462411035" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.rvGcc" useByScannerDiscovery="false" value="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.rvGcc.12" valueType="enumerated"/>
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.rvGcc.462411035" name="RISC-V Compiler" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.rvGcc" useByScannerDiscovery="false" value="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.rvGcc.12" valueType="enumerated"/>
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.other.840129689" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.other" useByScannerDiscovery="true" value="-march=rv32imac_zicsr" valueType="string"/>
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="ilg.gnumcueclipse.managedbuild.cross.riscv.targetPlatform.1944008784" isAbstract="false" osList="all" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.targetPlatform"/>
<builder buildPath="${workspace_loc:/${ProjName}}/obj" id="ilg.gnumcueclipse.managedbuild.cross.riscv.builder.1421508906" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.builder"/>
<tool id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.assembler.1244756189" name="GNU RISC-V Cross Assembler" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.assembler">
Expand Down Expand Up @@ -158,9 +159,5 @@
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
</storageModule>
<storageModule moduleId="refreshScope" versionNumber="2">
<configuration configurationName="obj">
<resource resourceType="PROJECT" workspacePath="/RF_CH582M"/>
</configuration>
</storageModule>
<storageModule moduleId="refreshScope"/>
</cproject>
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="-1586540034259274985" id="ilg.gnumcueclipse.managedbuild.cross.riscv.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT RISC-V Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="-1550949021711620137" id="ilg.gnumcueclipse.managedbuild.cross.riscv.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT RISC-V Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
Expand Down
2 changes: 1 addition & 1 deletion mounriver_project/RF_CH582M/obj/APP/subdir.mk
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ C_DEPS += \

# Each subdirectory must supply rules for building sources it contributes
APP/%.o: ../APP/%.c
@ @ riscv-none-elf-gcc -march=rv32imac -mabi=ilp32 -mcmodel=medany -msmall-data-limit=8 -mno-save-restore -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -g -I"E:\Project\tp78_v2\mounriver_project\RF_CH582M\Startup" -I"E:\Project\tp78_v2\mounriver_project\RF_CH582M\Ld" -I"E:\Project\tp78_v2\mounriver_project\RF_CH582M\RVMSIS" -I"E:\Project\tp78_v2\mounriver_project\RF_CH582M\StdPeriphDriver\inc" -I"E:\Project\tp78_v2\mounriver_project\RF_CH582M\APP\include" -I"E:\Project\tp78_v2\mounriver_project\RF_CH582M\HAL\include" -I"E:\Project\tp78_v2\mounriver_project\RF_CH582M\LIB" -std=gnu99 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<"
@ @ riscv-none-elf-gcc -march=rv32imac -mabi=ilp32 -mcmodel=medany -msmall-data-limit=8 -mno-save-restore -march=rv32imac_zicsr -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -g -I"E:\Project\tp78_v2\mounriver_project\RF_CH582M\Startup" -I"E:\Project\tp78_v2\mounriver_project\RF_CH582M\Ld" -I"E:\Project\tp78_v2\mounriver_project\RF_CH582M\RVMSIS" -I"E:\Project\tp78_v2\mounriver_project\RF_CH582M\StdPeriphDriver\inc" -I"E:\Project\tp78_v2\mounriver_project\RF_CH582M\APP\include" -I"E:\Project\tp78_v2\mounriver_project\RF_CH582M\HAL\include" -I"E:\Project\tp78_v2\mounriver_project\RF_CH582M\LIB" -std=gnu99 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<"
@ @

2 changes: 1 addition & 1 deletion mounriver_project/RF_CH582M/obj/HAL/subdir.mk
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ C_DEPS += \

# Each subdirectory must supply rules for building sources it contributes
HAL/%.o: ../HAL/%.c
@ @ riscv-none-elf-gcc -march=rv32imac -mabi=ilp32 -mcmodel=medany -msmall-data-limit=8 -mno-save-restore -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -g -I"E:\Project\tp78_v2\mounriver_project\RF_CH582M\Startup" -I"E:\Project\tp78_v2\mounriver_project\RF_CH582M\Ld" -I"E:\Project\tp78_v2\mounriver_project\RF_CH582M\RVMSIS" -I"E:\Project\tp78_v2\mounriver_project\RF_CH582M\StdPeriphDriver\inc" -I"E:\Project\tp78_v2\mounriver_project\RF_CH582M\APP\include" -I"E:\Project\tp78_v2\mounriver_project\RF_CH582M\HAL\include" -I"E:\Project\tp78_v2\mounriver_project\RF_CH582M\LIB" -std=gnu99 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<"
@ @ riscv-none-elf-gcc -march=rv32imac -mabi=ilp32 -mcmodel=medany -msmall-data-limit=8 -mno-save-restore -march=rv32imac_zicsr -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -g -I"E:\Project\tp78_v2\mounriver_project\RF_CH582M\Startup" -I"E:\Project\tp78_v2\mounriver_project\RF_CH582M\Ld" -I"E:\Project\tp78_v2\mounriver_project\RF_CH582M\RVMSIS" -I"E:\Project\tp78_v2\mounriver_project\RF_CH582M\StdPeriphDriver\inc" -I"E:\Project\tp78_v2\mounriver_project\RF_CH582M\APP\include" -I"E:\Project\tp78_v2\mounriver_project\RF_CH582M\HAL\include" -I"E:\Project\tp78_v2\mounriver_project\RF_CH582M\LIB" -std=gnu99 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<"
@ @

2 changes: 1 addition & 1 deletion mounriver_project/RF_CH582M/obj/RVMSIS/subdir.mk
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ C_DEPS += \

# Each subdirectory must supply rules for building sources it contributes
RVMSIS/%.o: ../RVMSIS/%.c
@ @ riscv-none-elf-gcc -march=rv32imac -mabi=ilp32 -mcmodel=medany -msmall-data-limit=8 -mno-save-restore -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -g -I"E:\Project\tp78_v2\mounriver_project\RF_CH582M\Startup" -I"E:\Project\tp78_v2\mounriver_project\RF_CH582M\Ld" -I"E:\Project\tp78_v2\mounriver_project\RF_CH582M\RVMSIS" -I"E:\Project\tp78_v2\mounriver_project\RF_CH582M\StdPeriphDriver\inc" -I"E:\Project\tp78_v2\mounriver_project\RF_CH582M\APP\include" -I"E:\Project\tp78_v2\mounriver_project\RF_CH582M\HAL\include" -I"E:\Project\tp78_v2\mounriver_project\RF_CH582M\LIB" -std=gnu99 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<"
@ @ riscv-none-elf-gcc -march=rv32imac -mabi=ilp32 -mcmodel=medany -msmall-data-limit=8 -mno-save-restore -march=rv32imac_zicsr -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -g -I"E:\Project\tp78_v2\mounriver_project\RF_CH582M\Startup" -I"E:\Project\tp78_v2\mounriver_project\RF_CH582M\Ld" -I"E:\Project\tp78_v2\mounriver_project\RF_CH582M\RVMSIS" -I"E:\Project\tp78_v2\mounriver_project\RF_CH582M\StdPeriphDriver\inc" -I"E:\Project\tp78_v2\mounriver_project\RF_CH582M\APP\include" -I"E:\Project\tp78_v2\mounriver_project\RF_CH582M\HAL\include" -I"E:\Project\tp78_v2\mounriver_project\RF_CH582M\LIB" -std=gnu99 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<"
@ @

2 changes: 1 addition & 1 deletion mounriver_project/RF_CH582M/obj/Startup/subdir.mk
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ S_UPPER_DEPS += \

# Each subdirectory must supply rules for building sources it contributes
Startup/%.o: ../Startup/%.S
@ @ riscv-none-elf-gcc -march=rv32imac -mabi=ilp32 -mcmodel=medany -msmall-data-limit=8 -mno-save-restore -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -g -x assembler -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<"
@ @ riscv-none-elf-gcc -march=rv32imac -mabi=ilp32 -mcmodel=medany -msmall-data-limit=8 -mno-save-restore -march=rv32imac_zicsr -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -g -x assembler -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<"
@ @

2 changes: 1 addition & 1 deletion mounriver_project/RF_CH582M/obj/StdPeriphDriver/subdir.mk
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,6 @@ C_DEPS += \

# Each subdirectory must supply rules for building sources it contributes
StdPeriphDriver/%.o: ../StdPeriphDriver/%.c
@ @ riscv-none-elf-gcc -march=rv32imac -mabi=ilp32 -mcmodel=medany -msmall-data-limit=8 -mno-save-restore -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -g -I"E:\Project\tp78_v2\mounriver_project\RF_CH582M\Startup" -I"E:\Project\tp78_v2\mounriver_project\RF_CH582M\Ld" -I"E:\Project\tp78_v2\mounriver_project\RF_CH582M\RVMSIS" -I"E:\Project\tp78_v2\mounriver_project\RF_CH582M\StdPeriphDriver\inc" -I"E:\Project\tp78_v2\mounriver_project\RF_CH582M\APP\include" -I"E:\Project\tp78_v2\mounriver_project\RF_CH582M\HAL\include" -I"E:\Project\tp78_v2\mounriver_project\RF_CH582M\LIB" -std=gnu99 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<"
@ @ riscv-none-elf-gcc -march=rv32imac -mabi=ilp32 -mcmodel=medany -msmall-data-limit=8 -mno-save-restore -march=rv32imac_zicsr -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -g -I"E:\Project\tp78_v2\mounriver_project\RF_CH582M\Startup" -I"E:\Project\tp78_v2\mounriver_project\RF_CH582M\Ld" -I"E:\Project\tp78_v2\mounriver_project\RF_CH582M\RVMSIS" -I"E:\Project\tp78_v2\mounriver_project\RF_CH582M\StdPeriphDriver\inc" -I"E:\Project\tp78_v2\mounriver_project\RF_CH582M\APP\include" -I"E:\Project\tp78_v2\mounriver_project\RF_CH582M\HAL\include" -I"E:\Project\tp78_v2\mounriver_project\RF_CH582M\LIB" -std=gnu99 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<"
@ @

2 changes: 1 addition & 1 deletion mounriver_project/RF_CH582M/obj/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ all: RF_CH582M.elf secondary-outputs

# Tool invocations
RF_CH582M.elf: $(OBJS) $(USER_OBJS)
@ @ riscv-none-elf-gcc -march=rv32imac -mabi=ilp32 -mcmodel=medany -msmall-data-limit=8 -mno-save-restore -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -g -T "E:\Project\tp78_v2\mounriver_project\RF_CH582M\Ld\Link.ld" -nostartfiles -Xlinker --gc-sections -L"../" -L"E:\Project\tp78_v2\mounriver_project\RF_CH582M\StdPeriphDriver" -L"E:\Project\tp78_v2\mounriver_project\RF_CH582M\LIB" -Xlinker --print-memory-usage -Wl,-Map,"RF_CH582M.map" --specs=nano.specs --specs=nosys.specs -o "RF_CH582M.elf" $(OBJS) $(USER_OBJS) $(LIBS)
@ @ riscv-none-elf-gcc -march=rv32imac -mabi=ilp32 -mcmodel=medany -msmall-data-limit=8 -mno-save-restore -march=rv32imac_zicsr -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -g -T "E:\Project\tp78_v2\mounriver_project\RF_CH582M\Ld\Link.ld" -nostartfiles -Xlinker --gc-sections -L"../" -L"E:\Project\tp78_v2\mounriver_project\RF_CH582M\StdPeriphDriver" -L"E:\Project\tp78_v2\mounriver_project\RF_CH582M\LIB" -Xlinker --print-memory-usage -Wl,-Map,"RF_CH582M.map" --specs=nano.specs --specs=nosys.specs -o "RF_CH582M.elf" $(OBJS) $(USER_OBJS) $(LIBS)
@ @
RF_CH582M.hex: RF_CH582M.elf
@ riscv-none-elf-objcopy -O ihex "RF_CH582M.elf" "RF_CH582M.hex"
Expand Down

0 comments on commit 503cbb6

Please sign in to comment.