2007-08-09 02:25 AM
2006-01-15 11:15 PM
Hello,
I am trying to get the microC/OS-II version 2.52 to run on the STR710 as described in AN-1710, except that it is tested with version 2.80. It looks like the timer interrupt does not work, has anyone got this working? Best regards, Frank Andersen2006-01-16 01:50 AM
Hi Frank,
I have uC/OS-II running on a couple of different STR711 and STR710 boards (version 2.77 I think) using IAR. I don't have any of the code in front of me at the moment but... What compiler are you using? Are you running from Flash or RAM? Are you sure your interrupt vectors are properly located and initialized? Make sure your clock settings in BSP.c are correct for your XTAL. If you are using the port pretty much as is...you need to make sure that you remap the internal RAM to address 0x0 because BSP.c assumes there is RAM at 0x0 and simply writes the appropriate LDR PC,[] instruction at the appropriate vector addresses (ie. 0x18, 0x1C, etc). Take a look at these things and I'll also try to help if I can when I get home tonight. I think I have a version 2.52 kicking around, so I could try that as well. Keep me posted. Ryan.2006-01-16 08:57 AM
I have that version running somewhere - i will have a look, stopped playing with it though due to the licensing costs.
Now using FreeRTOS, also have a look at tnkernel. I am also in the process of porting ecos which so far is running quite happily on the smaller str7 devices (711/712). Regards sjo2006-01-16 08:30 PM
Hi Ryan and sjo,
I am using IAR 4.30A. I want to run it from flash. I think the problem is the interupt vectors, could you advise me how to implement them, when running the code from flash. Have tried FreeRTOS and took a glance at tnkernel, but I would like to use microC/OS-II, because our product has to comply with FDA. Best regards, Frank Andersen2006-01-17 01:41 AM
Hi Frank,
Sorry I didn't get around to digging up uC/OS stuff last night. I will try to send you a .zip file tonight with a project set up to run out of flash... Basically though, you just need to link your code for flash and then early in main()....before the call to BSP_Init() remap RAM to address 0x0 via the BOOT bits in the PCU_BOOTCR register. Add a line like the following to the beginning of main()... *(volatile uint16_t *)0xA0000050 = 0x0002; Once RAM is remapped to zero then the initialization of the interrupt vector table will work properly in BSP_Init(). Here are a few of the relevant lines from BSP_Init() found in BSP.c: BSP_IRQ_VECTOR_ADDR = 0xE59FF018; /* LDR PC,[PC,#0x18] instruction */ BSP_IRQ_ISR_ADDR = (INT32U)OS_CPU_IRQ_ISR; /* IRQ exception vector address */ BSP_FIQ_VECTOR_ADDR = 0xE59FF018; /* LDR PC,[PC,#0x18] instruction */ BSP_FIQ_ISR_ADDR = (INT32U)OS_CPU_FIQ_ISR; /* FIQ exception vector address */ BSP_UNDEF_INSTRUCTION_VECTOR_ADDR = 0xEAFFFFFE; /* Jump to itself */ BSP_SWI_VECTOR_ADDR = 0xEAFFFFFE; BSP_PREFETCH_ABORT_VECTOR_ADDR = 0xEAFFFFFE; BSP_DATA_ABORT_VECTOR_ADDR = 0xEAFFFFFE; BSP_FIQ_VECTOR_ADDR = 0xEAFFFFFE; If RAM is not remapped then these writes will fail (since they will be trying to write to flash memory space) and I suspect this is why your timer interrupt (or any interrupts for that matter) are not working for you. Let me know if how you make out. Regards, Ryan.2006-01-17 02:13 AM
Hi Ryan,
I have made the remapping of the RAM to adress 0, and my tick now works. But is it not possible to make it without the remapping and put the vectors into flash? I am using the J-LINK debugger, and the STR711 developper board from IAR, to be able to run the code I need to remove the power from the board and connect power again, and then download the code. Then the OS runs untill I reset the system in the debugger, I think it is something with the remapping but I am not sure. Looking forward for an flash example. Best regards, Frank Andersen2006-03-27 05:07 AM
Hi Ryan/Frank,
Any luck with getting the uC/OS-II running from the flash. If so, please forward me an example project. Regards, [ This message was edited by: iamanil on 27-03-2006 21:28 ] [ This message was edited by: iamanil on 27-03-2006 22:29 ]2006-03-27 06:35 PM
No, at the moment I am using FreeRTOS, it runs from flash.
Best regards, Frank2007-08-09 02:25 AM
Hi rsherry:
I´m developing the uC/OS-II for STR711 but I can´t find the port. I´m working with STR712 port but there is something that doesn´t work. I know you have worked with that Kernel. Did you run it? Could you help me , please?