mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
add switches for smaller memory targets for the loader side
This commit is contained in:
parent
c20f6af52d
commit
2cb295ccf0
1 changed files with 10 additions and 4 deletions
|
|
@ -39,8 +39,8 @@ func RenderFontmapTemplate(fd []FontMap, small_fd []FontMap) string {
|
||||||
context := fontmapTemplateContext{fd, small_fd}
|
context := fontmapTemplateContext{fd, small_fd}
|
||||||
return renderTemplate(fontmapTemplate, "fontmap", context)
|
return renderTemplate(fontmapTemplate, "fontmap", context)
|
||||||
}
|
}
|
||||||
func RenderLoadermodTemplate(fd []FontSummary) string {
|
func RenderLoadermodTemplate(fd []FontSummary, small_fd []FontSummary) string {
|
||||||
context := loadermodTemplateContext{fd}
|
context := loadermodTemplateContext{fd, small_fd}
|
||||||
return renderTemplate(loadermodTemplate, "loadermod", context)
|
return renderTemplate(loadermodTemplate, "loadermod", context)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -71,7 +71,8 @@ type fontmapTemplateContext struct {
|
||||||
SmallFontDir []FontMap
|
SmallFontDir []FontMap
|
||||||
}
|
}
|
||||||
type loadermodTemplateContext struct {
|
type loadermodTemplateContext struct {
|
||||||
FontDir []FontSummary
|
FontDir []FontSummary
|
||||||
|
SmallFontDir []FontSummary
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return a string from rendering the given template and context data
|
// Return a string from rendering the given template and context data
|
||||||
|
|
@ -171,7 +172,12 @@ const loadermodTemplate = `#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||||
// The order of these modules affects the link order in the loader, which is referred to in the graphics engine.
|
// The order of these modules affects the link order in the loader, which is referred to in the graphics engine.
|
||||||
// To make changes, see <xous_root>/services/graphics-server/src/blitstr2/codegen/main.go
|
// To make changes, see <xous_root>/services/graphics-server/src/blitstr2/codegen/main.go
|
||||||
{{range $f := .FontDir}}
|
{{range $f := .FontDir}}
|
||||||
pub mod {{$f.Name}};{{end}}`
|
#[cfg(not(feature = "cramium-soc"))]
|
||||||
|
pub mod {{$f.Name}};{{end}}
|
||||||
|
{{range $f := .SmallFontDir}}
|
||||||
|
#[cfg(feature = "cramium-soc")]
|
||||||
|
pub mod {{$f.Name}};{{end}}
|
||||||
|
`
|
||||||
|
|
||||||
const fontmapTemplate = `#![cfg_attr(rustfmt, rustfmt_skip)]
|
const fontmapTemplate = `#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||||
// DO NOT MAKE EDITS HERE because this file is automatically generated.
|
// DO NOT MAKE EDITS HERE because this file is automatically generated.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue