Forum Discussion
Altera_Forum
Honored Contributor
21 years ago.rwdata
According to last version of the SW user manual, alt_load() must be called to copy .rwdata sections to RAM. (when there is no bootloader in teh system) Where can I find info about alt_load() M...
Altera_Forum
Honored Contributor
21 years agoAre you using nios 1.0 ? This is what I am struggling with now, I found that in order to get my internal ROM code to operate I needed to initialise some variables myself, so it involves inspecting driver code/etc to see if anything needs setup.
An example to get up-and-running with only the timer interrupt taken care of is. alt_main.c: # include <stdio.h># include <stdlib.h># include "system.h"# include "sys/alt_sys_init.h"# include "sys/alt_irq.h"# include "sys/alt_alarm.h" extern void* altera_avalon_timer_ts_base; extern alt_u32 altera_avalon_timer_ts_freq; extern alt_u32 alt_priority_mask; extern alt_u32 alt_irq_active; extern alt_u32 _alt_tick_rate; extern volatile alt_u32 _alt_nticks; extern alt_llist alt_alarm_list; void alt_main(void) { altera_avalon_timer_ts_base = (void*) 0; altera_avalon_timer_ts_freq = 0; alt_priority_mask = (alt_u32) -1; alt_irq_active = 0; _alt_tick_rate = 0; _alt_nticks = 0; alt_alarm_list.next = &alt_alarm_list; alt_alarm_list.previous = &alt_alarm_list; alt_irq_init (ALT_IRQ_BASE); alt_sys_init(); main(); for(;;) ; }