Skip to content

Commit

Permalink
Many bug fixes and improvements (v2.2.1)
Browse files Browse the repository at this point in the history
- add support for SiFive E21 (4 PMP regs / SiFive CLIC)
- increase CLIC max sources to 256
- zone1: add printf.c and strtok.c to reduce code size < 16K
- zone1: switch to vectored trap handler to reduce irq latency
- fix -Wall and -Wextra warnings
- update riscv-gnu-toolchain-20210618 (rv32i|rv32e|rv64i)mac
- update manual.pdf and README.md

multizone.jar @1b9f31 (v2.2.1) / kernel @6b58e8 (v2.2.1):

- major redesign of kernel internal data structures
- up to 32/64 clint + 64/128 plic sources
- up to 256 clic sources for both rv32 and rv64
- reduce size of most kern vars from REGSIZE to 4-byte
- increase trap & emulation i-cache size
- add support for SiFive clic (E21)
- reintroduce support for rv32e 16-regs
- update riscv-gnu-toolchain-20210618 (rv32i|rv32e|rv64i)c
  • Loading branch information
cgarlati committed Oct 8, 2021
1 parent a657e79 commit 15acc66
Show file tree
Hide file tree
Showing 41 changed files with 2,020 additions and 211 deletions.
68 changes: 68 additions & 0 deletions .cproject
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,65 @@
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
<cconfiguration id="cdt.managedbuild.toolchain.gnu.cross.base.1603369180.590572468.475102828">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.toolchain.gnu.cross.base.1603369180.590572468.475102828" moduleId="org.eclipse.cdt.core.settings" name="E21">
<externalSettings/>
<extensions>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactName="${ProjName}" buildProperties="" description="" errorParsers="org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.GmakeErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.CWDLocator" id="cdt.managedbuild.toolchain.gnu.cross.base.1603369180.590572468.475102828" name="E21" parent="org.eclipse.cdt.build.core.emptycfg">
<folderInfo id="cdt.managedbuild.toolchain.gnu.cross.base.1603369180.590572468.475102828." name="/" resourcePath="">
<toolChain id="cdt.managedbuild.toolchain.gnu.cross.base.1490216521" name="Cross GCC" superClass="cdt.managedbuild.toolchain.gnu.cross.base" unusedChildren="cdt.managedbuild.tool.gnu.cross.cpp.compiler;cdt.managedbuild.tool.gnu.cross.cpp.linker">
<option id="cdt.managedbuild.option.gnu.cross.prefix.901870821" name="Prefix" superClass="cdt.managedbuild.option.gnu.cross.prefix" useByScannerDiscovery="false" value="riscv64-unknown-elf-" valueType="string"/>
<option id="cdt.managedbuild.option.gnu.cross.path.1317891309" name="Path" superClass="cdt.managedbuild.option.gnu.cross.path" useByScannerDiscovery="false" value="${RISCV}/bin" valueType="string"/>
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.targetPlatform.gnu.cross.1659041725" isAbstract="false" osList="all" superClass="cdt.managedbuild.targetPlatform.gnu.cross"/>
<builder id="cdt.managedbuild.builder.gnu.cross.1869718834" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="cdt.managedbuild.builder.gnu.cross"/>
<tool id="cdt.managedbuild.tool.gnu.cross.assembler.2057002314" name="Cross GCC Assembler" superClass="cdt.managedbuild.tool.gnu.cross.assembler">
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="gnu.both.asm.option.include.paths.407039684" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/multizone-sdk}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/multizone-sdk/bsp/${ConfigName}}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/multizone-sdk/ext}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/multizone-sdk/ext/freertos/include}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/multizone-sdk/ext/freertos/portable/GCC/RISC-V}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/multizone-sdk/ext/freertos/portable/GCC/RISC-V/chip_specific_extensions/RV32I_CLINT_no_extensions}&quot;"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1177485063" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.cross.c.linker.282491035" name="Cross GCC Linker" superClass="cdt.managedbuild.tool.gnu.cross.c.linker">
<inputType id="cdt.managedbuild.tool.gnu.c.linker.input.87247543" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
</inputType>
</tool>
<tool id="cdt.managedbuild.tool.gnu.cross.archiver.1274848173" name="Cross GCC Archiver" superClass="cdt.managedbuild.tool.gnu.cross.archiver"/>
<tool id="cdt.managedbuild.tool.gnu.cross.c.compiler.1155518640" name="Cross GCC Compiler" superClass="cdt.managedbuild.tool.gnu.cross.c.compiler">
<option id="gnu.c.compiler.option.dialect.std.333431580" name="Language standard" superClass="gnu.c.compiler.option.dialect.std" useByScannerDiscovery="true" value="gnu.c.compiler.dialect.default" valueType="enumerated"/>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="gnu.c.compiler.option.include.paths.902870614" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/multizone-sdk}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/multizone-sdk/bsp/${ConfigName}}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/multizone-sdk/ext}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/multizone-sdk/ext/freertos/include}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/multizone-sdk/ext/freertos/portable/GCC/RISC-V}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/multizone-sdk/ext/freertos/portable/GCC/RISC-V/chip_specific_extensions/RV32I_CLINT_no_extensions}&quot;"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1773950353" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
</tool>
</toolChain>
</folderInfo>
<sourceEntries>
<entry excluding="ext/freertos/portable/GCC/RISC-V/chip_specific_extensions/Pulpino_Vega_RV32M1RM|ext/freertos/portable/GCC/TriCore_1782|ext/freertos/portable/GCC/STR75x|ext/freertos/portable/GCC/RX700v3_DPFPU|ext/freertos/portable/GCC/RX600v2|ext/freertos/portable/GCC/RX600|ext/freertos/portable/GCC/RX200|ext/freertos/portable/GCC/RX100|ext/freertos/portable/GCC/RL78|ext/freertos/portable/GCC/PPC440_Xilinx|ext/freertos/portable/GCC/PPC405_Xilinx|ext/freertos/portable/GCC/NiosII|ext/freertos/portable/GCC/MSP430F449|ext/freertos/portable/GCC/MicroBlazeV9|ext/freertos/portable/GCC/MicroBlazeV8|ext/freertos/portable/GCC/MicroBlaze|ext/freertos/portable/GCC/MCF5235|ext/freertos/portable/GCC/IA32_flat|ext/freertos/portable/GCC/HCS12|ext/freertos/portable/GCC/H8S2329|ext/freertos/portable/GCC/CORTUS_APS3|ext/freertos/portable/GCC/ColdFire_V2|ext/freertos/portable/GCC/AVR32_UC3|ext/freertos/portable/GCC/AVR_Mega0|ext/freertos/portable/GCC/AVR_AVRDx|ext/freertos/portable/GCC/ATMega323|ext/freertos/portable/GCC/ARM7_LPC23xx|ext/freertos/portable/GCC/ARM7_LPC2000|ext/freertos/portable/GCC/ARM7_AT91SAM7S|ext/freertos/portable/GCC/ARM7_AT91FR40008|ext/freertos/portable/GCC/ARM_CRx_No_GIC|ext/freertos/portable/GCC/ARM_CR5|ext/freertos/portable/GCC/ARM_CM7|ext/freertos/portable/GCC/ARM_CM4F|ext/freertos/portable/GCC/ARM_CM4_MPU|ext/freertos/portable/GCC/ARM_CM33_NTZ|ext/freertos/portable/GCC/ARM_CM33|ext/freertos/portable/GCC/ARM_CM3_MPU|ext/freertos/portable/GCC/ARM_CM3|ext/freertos/portable/GCC/ARM_CM23_NTZ|ext/freertos/portable/GCC/ARM_CM23|ext/freertos/portable/GCC/ARM_CM0|ext/freertos/portable/GCC/ARM_CA9|ext/freertos/portable/GCC/ARM_CA53_64_BIT|ext/freertos/portable/WizC|ext/freertos/portable/ThirdParty|ext/freertos/portable/Tasking|ext/freertos/portable/Softune|ext/freertos/portable/SDCC|ext/freertos/portable/RVDS|ext/freertos/portable/Rowley|ext/freertos/portable/Renesas|ext/freertos/portable/Paradigm|ext/freertos/portable/oWatcom|ext/freertos/portable/MSVC-MingW|ext/freertos/portable/MPLAB|ext/freertos/portable/MikroC|ext/freertos/portable/Keil|ext/freertos/portable/IAR|ext/freertos/portable/Common|ext/freertos/portable/CodeWarrior|ext/freertos/portable/CCS|ext/freertos/portable/BCC|ext/freertos/portable/ARMv8M|ext/freertos/portable/ARMClang" flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name=""/>
</sourceEntries>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="multizone-sdk.null.984752857" name="multizone-sdk"/>
Expand All @@ -310,6 +369,12 @@
<configuration configurationName="X300">
<resource resourceType="PROJECT" workspacePath="/multizone-sdk"/>
</configuration>
<configuration configurationName="Multiple configurations">
<resource resourceType="PROJECT" workspacePath="/multizone-sdk"/>
</configuration>
<configuration configurationName="E21">
<resource resourceType="PROJECT" workspacePath="/multizone-sdk"/>
</configuration>
<configuration configurationName="FE310">
<resource resourceType="PROJECT" workspacePath="/multizone-sdk"/>
</configuration>
Expand Down Expand Up @@ -353,6 +418,9 @@
</storageModule>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.cross.base.1603369180.590572468.475102828;cdt.managedbuild.toolchain.gnu.cross.base.1603369180.590572468.475102828.;cdt.managedbuild.tool.gnu.cross.c.compiler.1155518640;cdt.managedbuild.tool.gnu.c.compiler.input.1773950353">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.cross.base.1603369180.590572468;cdt.managedbuild.toolchain.gnu.cross.base.1603369180.590572468.;cdt.managedbuild.tool.gnu.cross.c.compiler.1920180134;cdt.managedbuild.tool.gnu.c.compiler.input.1991248588">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
Expand Down
20 changes: 15 additions & 5 deletions .settings/language.settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="1354299396477282116" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -march=rv32i -mabi=ilp32 -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="1356915691844643014" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -march=rv32i -mabi=ilp32 -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 All @@ -14,7 +14,7 @@
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="1349725499485729028" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="1352341794853089926" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${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 All @@ -24,7 +24,7 @@
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="1354299396477282116" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -march=rv32i -mabi=ilp32 -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true" store-entries-with-project="false">
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="1356915691844643014" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -march=rv32i -mabi=ilp32 -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true" store-entries-with-project="false">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
Expand All @@ -34,7 +34,7 @@
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="1354299396477282116" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -march=rv32i -mabi=ilp32 -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true" store-entries-with-project="false">
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="1356915691844643014" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -march=rv32i -mabi=ilp32 -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true" store-entries-with-project="false">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
Expand All @@ -44,7 +44,17 @@
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="1354299396477282116" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -march=rv32i -mabi=ilp32 -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true" store-entries-with-project="false">
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="1356915691844643014" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -march=rv32i -mabi=ilp32 -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true" store-entries-with-project="false">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
</extension>
</configuration>
<configuration id="cdt.managedbuild.toolchain.gnu.cross.base.1603369180.590572468.475102828" name="E21">
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="1356915691844643014" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -march=rv32i -mabi=ilp32 -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true" store-entries-with-project="false">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
Expand Down
Loading

0 comments on commit 15acc66

Please sign in to comment.