Forum Discussion
Altera_Forum
Honored Contributor
20 years agoUsing redboot with x/y modem
Hi,
I am trying to use redboot but I'm a bit stuck. The first thing I want to try to do is simply to download an executable into RAM over an RS232 link and then run it. I have built redboot by using the the default settings and then adding the -G0 global compiler flag, setting the debug device to "none" and the console device to "dev/uart1" (I made those changes after reading other posts about redboot in this forum). I am using a Nios II, Cyclone II dev kit. I have manged to program redboot into flash and when I reset the board I get a redboot prompt in Hyperterminal - so far so good! When I try to download a file using either "load - m xmodem" or "load -m ymodem" I get various error messages. I am using the "send file" tool in HyperTerminal. I have also tried reducing the baud rate from 115000 to 9600. At the slower baud rate I still get the redboot prompt but the errors are the same. I have noticed that this problem has been discussed in a few other posts, but there are no solutions posted. I am sure that some of you know how to make this work. Is there a secret trick? Thanks, Mike12 Replies
- Altera_Forum
Honored Contributor
Hi.
I had sucess in downloading program by x/y modem of redboot. Also, runing RAM Applicaiton program by redboot.. I have changed UART1 baudrate to 57600 by SOPC builder, and modified altera_avalon_uart_comm.c's altera_avalon_uart_diag_getc_timeout () functions in eCos driver. ~~~ typedef struct { cyg_uint8* port; cyg_uint32 irq; //Add by JYKoh cyg_int32 msec_timeout; //End } altera_avalon_uart_chan; ~~~ cyg_bool altera_avalon_uart_diag_getc_timeout(void* __ch_data, cyg_uint8* ch) { int delay_count; //Add By JYKoh altera_avalon_uart_chan* chan = (altera_avalon_uart_chan*)__ch_data; //End cyg_bool res; CYGARC_HAL_SAVE_GP(); //Chg by JYKoh // delay_count = 10; // delay in .1 ms steps delay_count = chan->msec_timeout * 10; // delay in .1 ms steps //End for(;;) { res = altera_avalon_uart_diag_getc_nonblock(__ch_data, ch); if (res || 0 == delay_count--) break; //Chg by JYKoh // HAL_DELAY_US(10); HAL_DELAY_US(100); //End } CYGARC_HAL_RESTORE_GP(); return res; } ~~ int altera_avalon_uart_diag_control(void *__ch_data, __comm_control_cmd_t __func, ...) { static int irq_state = 0; altera_avalon_uart_chan* chan; int ret = 0; cyg_uint32 ctrl; ~~~ //Add by JYKoh case __COMMCTL_SET_TIMEOUT: { va_list ap; va_start(ap, __func); ret = chan->msec_timeout; chan->msec_timeout = va_arg(ap, cyg_uint32); va_end(ap); } //End default: break; } CYGARC_HAL_RESTORE_GP(); return ret; } ~~~ - Altera_Forum
Honored Contributor
Hi Kohjy,
Thanks for posting that solution. Now that I have learned how to use u-boot I have decided that I like it so much that I will keep using it, it's really quite cool! Mike