FreeCalypso > hg > freecalypso-sw
comparison loadtools/compalram.c @ 945:86ff6d0b0a97
loadtools: fc-compalram trivial utility added
author | Mychaela Falconia <falcon@ivan.Harhan.ORG> |
---|---|
date | Mon, 02 Nov 2015 17:36:02 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
944:51f580665110 | 945:86ff6d0b0a97 |
---|---|
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 } |