changeset 362:b4fb0c7dfdf4

fluid-mnf: added -oC option to use cmd39.m0 for Calypso C05
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 14 Mar 2020 19:44:44 +0000
parents 5d1c186cc3cf
children 6cff3ee315e0
files fluid-mnf/fluid.c fluid-mnf/fluid.h fluid-mnf/machine.c
diffstat 3 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/fluid-mnf/fluid.c	Sat Mar 14 19:33:52 2020 +0000
+++ b/fluid-mnf/fluid.c	Sat Mar 14 19:44:44 2020 +0000
@@ -63,6 +63,7 @@
 
 int  arg_target_reset = 1;
 int  arg_rom_bootloader = 0;
+int  arg_calypso_c05 = 0;
 int  arg_boot_delay_rom = 15;
 int  arg_boot_delay_fluid = 15;
 int  arg_device_id0 = -1;
@@ -448,6 +449,7 @@
         "  -o <char>  Extra options:\n"
         "               o = Only bootstrap using ROM boot loader (Calypso devices only)\n"
         "               O = Do NOT use ROM boot loader\n"
+        "               C = use cmd39.m0 for Calypso C05\n"
         "               e = Skip erase (Require empty flash)\n"
         "               r = Reset target after download (default)\n"
         "               R = Do NOT reset target after download\n"
@@ -588,6 +590,7 @@
                 case 'r': arg_target_reset = 2; break;
                 case 'o': arg_rom_bootloader = 1; break;
                 case 'O': arg_rom_bootloader = -1; break;
+                case 'C': arg_calypso_c05 = 1; break;
                 case 'l': arg_uart_level_convert = 1; break;
                 case 'b':
                 case 'm': arg_hexfile_type = *optarg; break;
--- a/fluid-mnf/fluid.h	Sat Mar 14 19:33:52 2020 +0000
+++ b/fluid-mnf/fluid.h	Sat Mar 14 19:44:44 2020 +0000
@@ -134,6 +134,7 @@
 
 extern int  arg_target_reset;
 extern int  arg_rom_bootloader;
+extern int  arg_calypso_c05;
 extern int  arg_boot_delay_rom;
 extern int  arg_boot_delay_fluid;
 extern int  arg_device_id0;
--- a/fluid-mnf/machine.c	Sat Mar 14 19:33:52 2020 +0000
+++ b/fluid-mnf/machine.c	Sat Mar 14 19:44:44 2020 +0000
@@ -411,6 +411,8 @@
     // Read the command interpreter image file.
     if (bootloader_is_secure_rom)
         target_program_size = file_read_cmd(target_program, TARGET_PROGRAM_SIZE_MAX, a_certified_cmd_file_name);
+    else if (arg_calypso_c05)
+        target_program_size = file_read_cmd(target_program, TARGET_PROGRAM_SIZE_MAX, "cmd39.m0");
     else
         target_program_size = file_read_cmd(target_program, TARGET_PROGRAM_SIZE_MAX, "cmd.m0");