comparison loadtools/compalram.c @ 0:e7502631a0f9

initial import from freecalypso-sw rev 1033:5ab737ac3ad7
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 11 Jun 2016 00:13:35 +0000
parents
children 8c011177adb9
comparison
equal deleted inserted replaced
-1:000000000000 0:e7502631a0f9
1 /*
2 * This module contains the main() function for fc-compalram, a trivial
3 * utility that feeds a binary download image to Compal's bootloader
4 * and then switches into serial tty pass-through.
5 */
6
7 #include <stdio.h>
8 #include <stdlib.h>
9
10 extern char *target_ttydev;
11
12 main(argc, argv)
13 char **argv;
14 {
15 if (argc != 3) {
16 fprintf(stderr, "usage: fc-compalram ttyport image.bin\n");
17 exit(1);
18 }
19 target_ttydev = argv[1];
20 set_compalstage_fullpath(argv[2]);
21
22 open_target_serial();
23 perform_compal_stage(0);
24 tty_passthru();
25 exit(0);
26 }