mirror of
https://github.com/juanjiant-bit/JIANT.git
synced 2026-12-05 20:34:27 +01:00
The same mirror, rewritten to fit JIANT BYTE (its image nearly full, its sound pinned): a fill is one colour and its runs in the pixel frame (type 1 gone: ~130 B for the whole screen), the header written in a loop, the reply built in the mirror's own buffer, the 4 s timeout checked in ed_service. Its state is not static and sits after the pool (app.ld: .pool.mirror after .pool), so the compiler's merged globals stay as they were. The FM-1's image: 324 B smaller than the first version, 656 B less RAM. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UVqsRnhKjiABTzc6Ety3dd
63 lines
4.2 KiB
Plaintext
63 lines
4.2 KiB
Plaintext
/* SPDX-License-Identifier: GPL-3.0-only
|
|
* Copyright (C) 2026 Leo Kuroshita (@kurogedelic), Hügelton Instruments
|
|
* Copyright (C) 2026 Juan Ignacio Antonucci (Juan Jiant) */
|
|
/* FELUCCA memory map.
|
|
* Code + constants execute in place from XIP (app.bin offset 0 = 0x02000120).
|
|
* RAMTEXT (JIANT 0.6.78: at the top of the pool, was 0x01C00000): .ram_text (code that must run while the flash is
|
|
* busy: the flash driver), .c1_text (the second core's loop), .hot_text (core 0's hottest audio code). A call reaches
|
|
* +-4 MiB (pi32v2 imm23 x 2, no long calls in this compiler): RAM code there reaches the whole XIP image (build.py
|
|
* checks the margin); at 0x01C00000 it reached none of it.
|
|
* LOWBUF 0x01C00000..0x01C07000 (0.6.78; 0.6.82: 4 KiB more, the steps grew): main-loop buffers (undo, the song
|
|
* section's stage; the project scratch until 0.8.4 and the fonts' decode tables in 0.8.4, both in the pool since
|
|
* 0.8.5), zeroed at boot; 0x01C07000..0x01C08000 stays for RAM-run debug.
|
|
* RAM : .data/.bss (96 KiB)
|
|
* POOL : big zero-initialised buffers (FX lines, canvases), section .pool
|
|
* STACKS with 256-byte guard bands; NOINIT survives resets and UBOOT entry.
|
|
* 0x01C7FD50.. is reserved: boot_info, boot-state mailbox, vector table. */
|
|
MEMORY
|
|
{
|
|
XIP (rx) : ORIGIN = 0x02000120, LENGTH = 0x8EA90 /* = tools/fm1pkg_make.py APP_SLOT (0.9.13: the region ends at 0x92FFE) */
|
|
LOWBUF (rw) : ORIGIN = 0x01C00000, LENGTH = 0x7000
|
|
RAM (rwx) : ORIGIN = 0x01C08000, LENGTH = 96K
|
|
POOL (rw) : ORIGIN = 0x01C20000, LENGTH = 0x4FC00
|
|
RAMTEXT (rwx): ORIGIN = 0x01C6FC00, LENGTH = 0x6400 /* (0.6.97, 0.7.0: up 4 KiB each, the image grew: a call from here must
|
|
* reach its end; the user stack 4 KiB shorter each time, 15.75 KiB;
|
|
* 0.9.12: 1 KiB lower, from the pool: the 320 MHz switch) */
|
|
NOINIT (rw) : ORIGIN = 0x01C7C000, LENGTH = 0x3D50
|
|
}
|
|
SECTIONS
|
|
{
|
|
/* (0.9.12) what an interrupt reaches first, in name order (tools/build.py audio_sections): the UI cannot move it */
|
|
.text : { KEEP(*(.text.crt0)) *(SORT_BY_NAME(.text.a.*)) *(SORT_BY_NAME(.rodata.a.*)) *(.text*) *(.rodata*)
|
|
. = ALIGN(4); _etext = .; } > XIP
|
|
.ram_text : { _rt_start = .; KEEP(*(.ram_text*)) . = ALIGN(4); _rt_end = .; } > RAMTEXT AT > XIP
|
|
_rt_load = LOADADDR(.ram_text);
|
|
/* (JIANT 0.6.71) the second core's waiting loop (hal/fm1_multicore.h): in RAM, after the flash driver, inside the
|
|
* guard's RAM code window (_rt_start .. _c1t_end); its own section, as it calls the jobs (the build's check that
|
|
* .ram_text calls nothing still holds) */
|
|
.c1_text : { _c1t_start = .; KEEP(*(.c1_text*)) . = ALIGN(4); _c1t_end = .; } > RAMTEXT AT > XIP
|
|
_c1t_load = LOADADDR(.c1_text);
|
|
/* (JIANT 0.6.78) core 0's hottest audio code (tools/build.py HOT_FNS): in RAM after the second core's loop, inside the
|
|
* same RAM code window (_rt_start .. _hot_end) */
|
|
.hot_text : {
|
|
_hot_start = .;
|
|
KEEP(*(.hot_text*)) /* (tools/build.py HOT_FNS: their sections renamed in the optimised IR) */
|
|
. = ALIGN(4);
|
|
_hot_end = .;
|
|
} > RAMTEXT AT > XIP
|
|
_hot_load = LOADADDR(.hot_text);
|
|
.data : { . = ALIGN(4); _data_start = .; *(.data*) *(.sdata*) . = ALIGN(4); _data_end = .; } > RAM AT > XIP
|
|
_data_load = LOADADDR(.data);
|
|
.bss (NOLOAD) : { _bss_start = .; *(.bss*) *(.sbss*) *(COMMON) . = ALIGN(4); _bss_end = .; } > RAM
|
|
.pool (NOLOAD) : { _pool_start = .; *(.pool) *(.pool.*) . = ALIGN(4); _pool_end = .; } > POOL
|
|
/* (JIANT 0.6.71) the second core's stacks (hal/fm1_multicore.h): 6 KiB for the render, 1 KiB for an exception */
|
|
.c1_stacks (NOLOAD) : { . = ALIGN(32); _c1_stack_lo = .; . += 7168; _c1_stack_hi = .; } > POOL
|
|
_c1_ustack_top = _c1_stack_lo + 6144;
|
|
_c1_sstack_top = _c1_stack_hi;
|
|
.lowbuf (NOLOAD) : { _low_start = .; *(.lowbuf*) . = ALIGN(4); _low_end = .; } > LOWBUF
|
|
.noinit (NOLOAD) : { *(.noinit*) } > NOINIT
|
|
_guard0 = 0x01C76000; _ustack_lo = 0x01C76100; _ustack_top = 0x01C7A000;
|
|
_guard1 = 0x01C7A000; _sstack_lo = 0x01C7A100; _sstack_top = 0x01C7C000;
|
|
/DISCARD/ : { *(.comment) *(.note*) }
|
|
}
|