Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
16 years ago

hello micro c osii

I am trying to get the hello world example for micro c osii to work on my board. I have a custom board with a cyclone III 120 on it. I have a serial flash and two sdrams hooked up as well as an onboard memory.

I have an endless loop project running from onboard memory. But I'm not sure about the size of the hello world rtos project if it will run from onboard memory or if it is too large?

When I compile, it doesn't complain, but it doesn't seem to be running either. I am not getting any hello world messages and I can't get breakpoints in the tasks to hit.

Can anyone help me out with this. It should be straight forward, but I'm stuck.

thanks:confused:

9 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    After successful compilation there will be a line mentioning total size of code + initialized data.

    Your on-board memory should be large enough to hold this code + some extra space for stack operations.

    Hope this will help u.

    -Sanjay
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    thanks, with my other projects I can see this message with code size but the RTOS project blows the message by so fast I can't see it. I need to know what file the build messages are saved to in the IDE tool. Anyone know?

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Try to build project from nios console.

    Alternate solution would be to use readelf command. This command will provide you with information for each section like code, bss etc. in your executable.

    -Sanjay
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    is there any documentation on using the console or anything in regard to the build proceedure in nios. So far I have stayed happily isolated from the underworkings of their build scripts and makefiles, but I need to get in there and at least see the build messages. I have no idea how to use the nios console though.:rolleyes:

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Ok, I was able to get the messages out of the build and have verified that I have plenty of onboard ram to run the project. When I run, I put breakpoints in main but never hit. How can I go on debugging this issue? I have a full featured timer in my SOPC that does micro second time units. I'm not sure if this is an issue since the OS seems to support millisecond time slices at best. Please help me get this project going. I can give any info needed in the debugger to help get this running.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    the code is getting stuck checking for active interrupts in alt_irq_handler().

    there is always interrupt 16 pending. When the ISR for this irq is called, the interrupt is never cleared and the program hangs. This is bit 4. I have IRQ 4 assigned to a full featured 1us timer core.

    Can anyone help me with this. I am getting stuck before hitting main() inside alt_irq_handler() with my timer always interrupting. I am using the standard hello microc osII project with the correct timer and jtaguart cores specified in the library settings. does this project expect a ms timer?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi, I am new in micro c osii

    I am trying to run the hello MicroC/OS-II template from nios II IDE in my own SOPC system.

    I am using Stratix II GX EP2SGX90EF1152 FPGA.

    My system has Nios II processor, 128KB memory on chip, sys_clk_timer=10ms,jtag-uart, sysid, clk=50 MHz.

    When I built the project: Builted completed (all looks fine)

    When I run the project: leaving target processor paused

    and nothing happens and I don't get the message os Hello task1... hello task 2...

    Help will be greatly appreciated
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    System Library contents:

    RTOS: MicroC/OS-II

    std_out, stderr, stdin= jtag_uart.

    system clock timer= sys_clk_timer (10ms)

    Timestamp timer: none

    Thanks in advance