infineon4engineers Facebook

infineon@google+ Google+

infineon@linkedin linkedin

infineon4engi@twitter twitter

infineon@youtube youtube

+ Reply to Thread
Page 3 of 3 FirstFirst 1 2 3
Results 21 to 22 of 22

Thread: Get current system clock time

  1. #21
    Intermediate Intermediate Pirate02 is on a distinguished road
    Join Date
    Jun 2019

    problem variables

    Hello HIGHTEC.henk-piet.glas, thank you for your example. I try simio2 but I have a error in the main(). The IDE say that the 2 variables are undefinied (_lc_b_nill and _lc_e_nill), so I can't generate the makefile (I attached the project). And also, I run the code HelloSerial on the board and I change de Baudrate in the simulatedI/O interface by 38400 but I have no output.

    Click image for larger version

Name:	Capture.PNG
Views:	0
Size:	11.9 KB
ID:	4045

    Click image for larger version

Name:	Capture1.PNG
Views:	0
Size:	14.0 KB
ID:	4046

    Click image for larger version

Name:	Capture2.PNG
Views:	0
Size:	11.4 KB
ID:	4047

    Can I have to change something in the Comm Port or Terminal in the propreties of SimulatedI/O to have the output of simio or the example HelloInterrupt of HighTec ?

    Thank you in advance.

    Best regards,
    Last edited by Pirate02; Jul 19th, 2019 at 02:02 AM.

  2. #22
    Intermediate Intermediate HIGHTEC.henk-piet.glas is on a distinguished road
    Join Date
    May 2017


    The reason why the labels are marked as unresolved is because you created a new project based on the iRAM.lm model file. This model file contains an XML description of your target and it generates iRAM.ld containing the effective linker script language. You subsequently forgot to add the symbols to this script.

    If you scroll through RAM.ld you will note it repeatedly contains Protection-Area blocks. These are reserved spots where you can inject your own linker script snippets. For as long as you do this in a reserved spot they will not be overwritten if the linker script is regenerated from the iRAM.lm.

    I made the following changes to your project:
    1. In the compiler options I enabled to -ffunction-sections optimisation. This tells the compiler to suffix default function section names with the name of the function it is coding. So instead of .text you get .text.nill for this specific case.
    2. In iRAM.ld I added the same linker script snippet as before. You'll find it embedded into output section .text.
    After the above I rebuild your project. Here's a snippet taken from your mapfile. Note how labels _lc_b_nill and _lc_e_nill nicely encapsulate your nill function.

    .text           memory region -> PMI_PSPR
                    0xc0000400     0x3e18
                    0xc0000400                PROVIDE (__text_start, .)
                    0xc0000400                PROVIDE (_lc_b_nill, .)
     .text.nill     0xc0000400        0x4 src\nill.o
                    0xc0000400                nill
                    0xc0000404                PROVIDE (_lc_e_nill, .)
    To be complete I have uploaded my changes so you can review them for yourself. Also note that since you selected the iRAM configuration, that your code will be downloaded into RAM memory.

    For the serial example, in addition to setting the baudrate you must afterwards right-click the console area of the simulated IO window and from there select Connect COM Port.... This should do the trick. Also see the snapshot below:

    Click image for larger version

Name:	connect.png
Views:	0
Size:	234.7 KB
ID:	4050

    Best regards,

    Henk-Piet Glas

    Principal Technical Specialist
    Embedded Software

+ Reply to Thread

Tags for this Thread


All content and materials on this site are provided “as is“. Infineon makes no warranties or representations with regard to this content and these materials of any kind, whether express or implied, including without limitation, warranties or representations of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, whether express or implied, is granted by Infineon. Use of the information on this site may require a license from a third party, or a license from Infineon.

Infineon accepts no liability for the content and materials on this site being accurate, complete or up- to-date or for the contents of external links. Infineon distances itself expressly from the contents of the linked pages, over the structure of which Infineon has no control.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Usage Terms of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Usage Terms of this site. Infineon reserves the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.