I am trying to build OpenGD77 from source code zipball.
----
It should be written at other place but I have no time to find now so I write here
(If we were at GitHub, simply create issue... So guide me suitable place, please!)
To obtain OpenGD77.bin, we use codec_cleaner; no source program.
It clears (fills with 0xff) regions at 0x00000400~0x00003fff and 0x0004c000~0x00076fff region of firmware.bin but I think this is very dangerous because the linker script does not define clearly about codec_bin_section 1 and 2.
Here is the remedy, diiff for linkerscripts/firmware_newlib.ld.
Code: Select all
--- firmware_newlib.ld.old 2021-06-28 20:24:03.577940493 +0900
+++ firmware_newlib.ld 2021-06-28 20:32:43.234621443 +0900
@@ -40,9 +40,12 @@
.codec_bin_section_1 : ALIGN(4)
{
+ FILL(0xff)
. = ABSOLUTE(0x4400) ;
*(.codec_bin_section_1)
KEEP(*(.codec_bin_section_1))
+ FILL(0xff)
+ . = ABSOLUTE(0x8000) ;
} > PROGRAM_FLASH
.text_main : ALIGN(4)
@@ -106,9 +109,12 @@
.codec_bin_section_2 : ALIGN(4)
{
+ FILL(0xff)
. = ABSOLUTE(0x54000) ;
*(.codec_bin_section_2)
KEEP(*(.codec_bin_section_2))
+ FILL(0xff)
+ . = ABSOLUTE(0x7f000) ;
} > PROGRAM_FLASH
/* BSS section for SRAM_LOWER */
73 to all,