From 4e84caec790dafaf976841e6b059fec8dc461c12 Mon Sep 17 00:00:00 2001 From: Kirill Zhumarin Date: Sun, 9 Jun 2024 10:11:18 +0000 Subject: [PATCH] re files --- src/pages/ReFiles.jsx | 132 +++++++++++++++++++++++++++--------------- src/utils.js | 1 + 2 files changed, 85 insertions(+), 48 deletions(-) diff --git a/src/pages/ReFiles.jsx b/src/pages/ReFiles.jsx index 195cc01..0474d96 100644 --- a/src/pages/ReFiles.jsx +++ b/src/pages/ReFiles.jsx @@ -1,62 +1,34 @@ import { A } from "@solidjs/router"; -import { SWILIB_TOOLS_API } from "~/utils"; -import { fetchPhones } from "~/components/Swilib/PhonesTabs"; +import { PMB887X_DEV_API, SWILIB_TOOLS_API } from "~/utils"; import { createResource } from "solid-js"; import { Spinner } from "solid-bootstrap"; +export async function fetchPhones() { + return (await fetch(`${SWILIB_TOOLS_API}/phones.json`)).json(); +} + +export async function fetchCpuFiles() { + return (await fetch(`${SWILIB_TOOLS_API}/cpu-files.json`)).json(); +} + function ReFiles() { - let [apiResult] = createResource(fetchPhones); + let [phones] = createResource(fetchPhones); + let [cpuFiles] = createResource(fetchCpuFiles); return (<> - + Loading... - + - -
CPU IO registers
- - - - - - - - - - {(platform) => - - - - - - } - -
- Phone - - Ghidra - - IDA Pro -
- {platform} - - - registers-{platform}.txt - - - - registers-{platform}.idc - -
- +
Swilib data types for dissasembler
@@ -76,7 +48,7 @@ function ReFiles() { {platform} @@ -85,9 +57,12 @@ function ReFiles() {
- + swilib-types-{platform}.h
-
-
Firmware symbols for dissasembler
+ +
+ For IDA Pro, only symbol names are available, without associated data types. +
+ @@ -106,7 +81,7 @@ function ReFiles() { - {(phone) => + {(phone) => @@ -129,6 +104,67 @@ function ReFiles() {
{phone.name} @@ -115,12 +90,12 @@ function ReFiles() { {phone.platform} - + symbols-{phone.name}.txt - + symbols-{phone.name}.idc
+ + + + Loading... + + + + + + + + +
CPU IO registers
+ +
+ If your device is not listed below, select the generic PMB8875 (for X75 or SG) or PMB8876 (for ELKA or NSG). +
+ + + + + + + + + + + + {(file) => + + + + + + + } + +
+ Device + + CPU + + Ghidra + + IDA Pro +
+ {file.name} + + {file.cpu} + + + {file.ghidra} + + + + {file.ida} + +
+
); } diff --git a/src/utils.js b/src/utils.js index dbd1be5..ed093e5 100644 --- a/src/utils.js +++ b/src/utils.js @@ -1,4 +1,5 @@ export const SWILIB_TOOLS_API = import.meta.env.VITE_SWILIB_TOOLS_API; +export const PMB887X_DEV_API = import.meta.env.VITE_PMB887X_DEV_API; export function resolveURL(url) { return `${import.meta.env.BASE_URL}${url}`.replace(/[\/]+/g, '/');