Integrate psxreadmap
This commit is contained in:
parent
da80e99b91
commit
09e6aef606
|
@ -22,6 +22,17 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"label": "read memory map",
|
||||||
|
"type": "shell",
|
||||||
|
"command": "psxreadmap.exe ${input:output memory map} application/bin/PSX-${input:build profile}/PoolBox.elf",
|
||||||
|
"problemMatcher": [],
|
||||||
|
"options": {
|
||||||
|
"env": {
|
||||||
|
"PATH": "${env:JABY_ENGINE_PATH}/bin;${env:PATH}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"inputs": [
|
"inputs": [
|
||||||
{
|
{
|
||||||
|
@ -44,6 +55,13 @@
|
||||||
"options": ["all", "clean", "rebuild"],
|
"options": ["all", "clean", "rebuild"],
|
||||||
"default": "all",
|
"default": "all",
|
||||||
"description": "the build target"
|
"description": "the build target"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "output memory map",
|
||||||
|
"type": "pickString",
|
||||||
|
"options": ["", "-o application/bin/PoolBox.map"],
|
||||||
|
"default": "",
|
||||||
|
"description": "Output a memory map"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
|
@ -6,6 +6,12 @@ pub struct MemoryMap {
|
||||||
pub sections: Vec<Section>
|
pub sections: Vec<Section>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl MemoryMap {
|
||||||
|
pub fn is_empty(&self) -> bool {
|
||||||
|
self.global.is_empty() && self.sections.is_empty()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
pub struct Section {
|
pub struct Section {
|
||||||
pub name: String,
|
pub name: String,
|
||||||
|
|
|
@ -633,5 +633,13 @@ impl NamedMemoryArea for SectionInfo {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn load_memory_map(use_wsl: bool, input: PathBuf) -> Result<MemoryMap, Error> {
|
pub fn load_memory_map(use_wsl: bool, input: PathBuf) -> Result<MemoryMap, Error> {
|
||||||
readmap_helper::generate_memory_map(use_wsl, input)
|
let memory_map = readmap_helper::generate_memory_map(use_wsl, input)?;
|
||||||
|
|
||||||
|
if memory_map.is_empty() {
|
||||||
|
Err(Error::from_str("Failed reading memory map. Is the path correct?"))
|
||||||
|
}
|
||||||
|
|
||||||
|
else {
|
||||||
|
Ok(memory_map)
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -22,6 +22,17 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"label": "read memory map",
|
||||||
|
"type": "shell",
|
||||||
|
"command": "psxreadmap.exe ${input:output memory map} application/bin/PSX-${input:build profile}/#{ProjectName}.elf",
|
||||||
|
"problemMatcher": [],
|
||||||
|
"options": {
|
||||||
|
"env": {
|
||||||
|
"PATH": "${env:JABY_ENGINE_PATH}/bin;${env:PATH}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"inputs": [
|
"inputs": [
|
||||||
{
|
{
|
||||||
|
@ -44,6 +55,13 @@
|
||||||
"options": ["all", "clean", "rebuild"],
|
"options": ["all", "clean", "rebuild"],
|
||||||
"default": "all",
|
"default": "all",
|
||||||
"description": "the build target"
|
"description": "the build target"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "output memory map",
|
||||||
|
"type": "pickString",
|
||||||
|
"options": ["", "-o application/bin/#{ProjectName}.map"],
|
||||||
|
"default": "",
|
||||||
|
"description": "Output a memory map"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue