Interim changes

This commit is contained in:
Philip Smart
2022-08-24 21:45:11 +01:00
parent cfd6e7d0a5
commit aac57e01aa
14 changed files with 112 additions and 82 deletions

View File

@@ -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:

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -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) }
}