diff --git a/common/tranzputer.c b/common/tranzputer.c index 1e24875..13aca96 100644 --- a/common/tranzputer.c +++ b/common/tranzputer.c @@ -1602,7 +1602,7 @@ uint32_t setZ80CPUFrequency(float frequency, uint8_t action) // Locals. // uint32_t actualFreq = 0; - +printf("Change freq:%d, %f\n", action, frequency); // Setup the alternative clock frequency on the CTL_CLK pin. // if(action < 3) @@ -3455,6 +3455,8 @@ printf("CPUCONFIG=%02x\n", cpuConfig); // Make sure the video mode in the FPGA is correct (defaults to MZ700). writeZ80IO(IO_TZ_VMCTRL, VMMODE_MZ2000, TRANZPUTER); } + printf("Changing freq to 20MHz\n"); + setZ80CPUFrequency(20000000, 0); break; case HW_MZ80A: diff --git a/libraries/lib/libimath2-k64f.a b/libraries/lib/libimath2-k64f.a index 01ed16c..0458503 100644 Binary files a/libraries/lib/libimath2-k64f.a and b/libraries/lib/libimath2-k64f.a differ diff --git a/libraries/lib/libimath2-zpu.a b/libraries/lib/libimath2-zpu.a index efee363..f447498 100644 Binary files a/libraries/lib/libimath2-zpu.a and b/libraries/lib/libimath2-zpu.a differ diff --git a/libraries/lib/libumansi-k64f.a b/libraries/lib/libumansi-k64f.a index 78e0e15..cbb44ff 100644 Binary files a/libraries/lib/libumansi-k64f.a and b/libraries/lib/libumansi-k64f.a differ diff --git a/libraries/lib/libumansi-zpu.a b/libraries/lib/libumansi-zpu.a index e6f5c40..3c76125 100644 Binary files a/libraries/lib/libumansi-zpu.a and b/libraries/lib/libumansi-zpu.a differ diff --git a/libraries/lib/libummath-k64f.a b/libraries/lib/libummath-k64f.a index 771c2c2..8b6dca6 100644 Binary files a/libraries/lib/libummath-k64f.a and b/libraries/lib/libummath-k64f.a differ diff --git a/libraries/lib/libummath-zpu.a b/libraries/lib/libummath-zpu.a index e8a1a77..081d5ae 100644 Binary files a/libraries/lib/libummath-zpu.a and b/libraries/lib/libummath-zpu.a differ diff --git a/libraries/lib/libummathf-k64f.a b/libraries/lib/libummathf-k64f.a index d28e874..4f6e166 100644 Binary files a/libraries/lib/libummathf-k64f.a and b/libraries/lib/libummathf-k64f.a differ diff --git a/libraries/lib/libummathf-zpu.a b/libraries/lib/libummathf-zpu.a index 7c3b9c3..9a3fd9f 100644 Binary files a/libraries/lib/libummathf-zpu.a and b/libraries/lib/libummathf-zpu.a differ diff --git a/libraries/lib/libummisc-k64f.a b/libraries/lib/libummisc-k64f.a index c1242f3..c525fbb 100644 Binary files a/libraries/lib/libummisc-k64f.a and b/libraries/lib/libummisc-k64f.a differ diff --git a/libraries/lib/libummisc-zpu.a b/libraries/lib/libummisc-zpu.a index 111e770..5a4a9c5 100644 Binary files a/libraries/lib/libummisc-zpu.a and b/libraries/lib/libummisc-zpu.a differ diff --git a/libraries/lib/libumstdio-k64f.a b/libraries/lib/libumstdio-k64f.a index fc72d3f..2384bee 100644 Binary files a/libraries/lib/libumstdio-k64f.a and b/libraries/lib/libumstdio-k64f.a differ diff --git a/libraries/lib/libumstdio-zpu.a b/libraries/lib/libumstdio-zpu.a index dc4d732..6aca5dd 100644 Binary files a/libraries/lib/libumstdio-zpu.a and b/libraries/lib/libumstdio-zpu.a differ diff --git a/startup/zputa_with_tiny_iocp_in_bram.ld b/startup/zputa_with_tiny_iocp_in_bram.ld index 8e8e02e..5fc9f5f 100644 --- a/startup/zputa_with_tiny_iocp_in_bram.ld +++ b/startup/zputa_with_tiny_iocp_in_bram.ld @@ -35,96 +35,124 @@ MEMORY { BOOT (rx) : ORIGIN = 0x00001000, LENGTH = 0x000200 /* Boot section which shouldnt exist in an app, so a link trap as warning */ CODE (rx) : ORIGIN = 0x00001200, LENGTH = 0x0000AE00 /* Up to the end of the RAM first less stack space */ + HEAP (rx) : ORIGIN = 0x0000AFF4, LENGTH = 0x4000 /* Allocated heap space for the OS. */ + STACK (rx) : ORIGIN = 0x0000EFF8, LENGTH = 0x1000 /* Allocated stack space for the OS. */ } /* Section Definitions */ SECTIONS { - /* first section is .fixed_vectors which is used for startup code */ - . = 0x00001000; - _ramstart = . ; - __boot_start__ = . ; - .fixed_vectors : - { - KEEP(*(.fixed_vectors)) /* Seed section - allows -gc-sections */ - }>BOOT - __boot_end__ = . ; + /* first section is .fixed_vectors which is used for startup code */ + . = 0x00001000; + _ramstart = . ; + __boot_start__ = . ; + .fixed_vectors : + { + KEEP(*(.fixed_vectors)) /* Seed section - allows -gc-sections */ + }>BOOT + __boot_end__ = . ; - /* Remaining code sections */ - . = ALIGN(4); - __text_start__ = . ; - .text : - { - *(.text) /* remaining code */ - *(.text.*) /* remaining code */ - . = ALIGN(4); - __ctors_start__ = . ; - KEEP(*(.ctors)) - KEEP(*(.ctors.*)) - __ctors_end__ = . ; + /* Remaining code sections */ . = ALIGN(4); - __dtors_start__ = . ; - KEEP(*(.dtors)) - KEEP(*(.dtors.*)) - __dtors_end__ = . ; - } >CODE - __text_end__ = . ; - - /* .rodata section which is used for read-only data (constants) */ - . = ALIGN(4); - __rodata_start__ = . ; - .rodata : - { - *(.rodata) - *(.rodata.*) - } >CODE - . = ALIGN(4); - __rodata_end__ = . ; - _ramend = . ; - - /* .data section which is used for initialized data. */ - . = ALIGN(4); - _datastart = . ; - .data : - { - _data = . ; - __data_start__ = . ; - *(.data) - *(.data.*) - SORT(CONSTRUCTORS) + __text_start__ = . ; + .text : + { + *(.text) /* remaining code */ + *(.text.*) /* remaining code */ + . = ALIGN(4); + __ctors_start__ = . ; + KEEP(*(.ctors)) + KEEP(*(.ctors.*)) + __ctors_end__ = . ; + . = ALIGN(4); + __dtors_start__ = . ; + KEEP(*(.dtors)) + KEEP(*(.dtors.*)) + __dtors_end__ = . ; + } >CODE + __text_end__ = . ; + + /* .rodata section which is used for read-only data (constants) */ . = ALIGN(4); - __data_end__ = . ; - } >CODE + __rodata_start__ = . ; + .rodata : + { + *(.rodata) + *(.rodata.*) + } >CODE + . = ALIGN(4); + __rodata_end__ = . ; + _ramend = . ; + + /* .data section which is used for initialized data. */ + . = ALIGN(4); + _datastart = . ; + .data : + { + _data = . ; + __data_start__ = . ; + *(.data) + *(.data.*) + SORT(CONSTRUCTORS) + . = ALIGN(4); + __data_end__ = . ; + } >CODE + + /* .bss section which is used for uninitialized data */ + . = ALIGN(4); + .bss : + { + __bss_start = . ; + __bss_start__ = . ; + *(.bss) + *(.bss.*) + *(COMMON) + __bss_end__ = . ; + _end = . ; + } >CODE + _dataend = . ; - /* .bss section which is used for uninitialized data */ - . = ALIGN(4); - .bss : - { - __bss_start = . ; - __bss_start__ = . ; - *(.bss) - *(.bss.*) - *(COMMON) - __bss_end__ = . ; - _end = . ; - } >CODE - _dataend = . ; + /* Variable expanded by build.sh */ + .heap 0x0000AFF4: + { + /* . = 0x0000AFF4; */ + . = ALIGN(4); + __heap_section_start__ = .; + __HeapBase = .; + PROVIDE(end = .); + . += 0x4000; + __end__ = .; + __HeapLimit = .; + __heap_section_end__ = .; + } > HEAP + + /* Variable expanded by build.sh */ + .stack 0x0000EFF8 : + { + /* . = 0x0000EFF8; */ + . = ALIGN(4); + __stack_section_start__ = .; + . += 0x1000; + __stack_section_end__ = .; + } > STACK + + /* + __HeapBase = 0x0000AFF4; + __HeapLimit = 0x0000EFF4; + */ + + /* Top of stack pointer, used for sbrk validation. */ + _stack = 0x0000FFF8; - __HeapBase = .; - __HeapLimit = 0x0000DFF8 - 0x400; - - /* Top of stack pointer, used for sbrk validation. */ - _stack = 0x0000DFF8; - - /* Debug information */ - .debug_loc 0 : { *(.debug_loc) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_str 0 : { *(.debug_str) } - .debug_info 0 : { *(.debug_info) } - .debug_line 0 : { *(.debug_line) } - .debug_frame 0 : { *(.debug_frame) } - .debug_pubnames 0 : { *(.debug_pubnames) } - .debug_aranges 0 : { *(.debug_aranges) } - .comment : { *(.comment) } + /* Debug information */ + .debug_loc 0 : { *(.debug_loc) } + .debug_abbrev 0 : { *(.debug_abbrev) } + .debug_str 0 : { *(.debug_str) } + .debug_info 0 : { *(.debug_info) } + .debug_line 0 : { *(.debug_line) } + .debug_frame 0 : { *(.debug_frame) } + .debug_pubnames 0 : { *(.debug_pubnames) } + .debug_aranges 0 : { *(.debug_aranges) } + .comment : { *(.comment) } }