Banner_AURIX_Security-Solution Banner_AURIX_Security-Solution Banner_AURIX_Security-Solution


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 30 of 30

Thread: Get current system clock time

  1. #21
    Intermediate Intermediate Pirate02 is on a distinguished road
    Join Date
    Jun 2019
    Posts
    15
    Points
    330

    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:	1
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:	1
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
    Advanced Advanced HIGHTEC.henk-piet.glas is on a distinguished road
    Join Date
    May 2017
    Posts
    106
    Points
    2077.5

    Hi,

    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.

    Code:
    .text           memory region -> PMI_PSPR
                    0xc0000400     0x3e18
                    0xc0000400                PROVIDE (__text_start, .)
                    0xc0000400                PROVIDE (_lc_b_nill, .)
     *(.text.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
    ?????

  3. #23
    Intermediate Intermediate Pirate02 is on a distinguished road
    Join Date
    Jun 2019
    Posts
    15
    Points
    330

    Retrieve the value of a variable on PC from TC275

    Hello, Thank for the answer.

    I don't understand how you did the step 1 and 2 that you describe. I take the files in "ld" and I paste it into my project and when I executed the code on my board it send me the adress 0x000400 for the start and end adress (so the board doesn't send nothing, it's the default values). I work on a IROM version because I have to load a lot of information in the memory (so I left the IRAM). Futures I have to retrieve the adresses between a section where I call my function (I want to integrated this code to my follow project here).

    In parallel I work in a different project in order to display the execution time on the glcd and send this information through the serial port. I succeeded to display the CPU time on the GLCD and retrieve this information through the serial PORT .

    So now I search to save the output of SIMULATIONI/O that I have in a text file (Port 4, baudrate 34800) automatically through the code in main() on my PC (not from the option of the interface of SIMULATIONI/O).

    Thank you in advance. (I wanted to thank you for your help. It assist me to learn how to use the board.)
    ?????
    Last edited by Pirate02; Jul 23rd, 2019 at 06:36 AM.

  4. #24
    Advanced Advanced HIGHTEC.henk-piet.glas is on a distinguished road
    Join Date
    May 2017
    Posts
    106
    Points
    2077.5

    Hi Pirathap,

    I have attached a retouched version of the serial IO example. I also uploaded a new recording (password:District 9). I made retouches to the hello.c module and also to nill.c. Both are demonstrated in the recording. Not demonstrated in the recording is the setting that I referred to in my previous posting. You can check this yourself via:

    Code:
    Project | Properties | C/C++ build | Settings | TriCore C Compiler | Code Generation
    Note in here that I enabled the -ffunction-sections option. I also demonstrate in the recording where you need to create your locator symbols. Note that I'm using a protected region within the .text output section. Also note that it effectively is the first selection within this output section. This assures that .text.nill is uniquely selected and not accidentally bundled with the hoi polloi of the remaining code sections.

    I then build the example as before and download it on my ShieldBuddy target. This time I don't enable the simulated IO tab. I just start an external terminal connected to COM3 (COM3 emulates a serial channel via the DAS drivers). I then enter 3 and the labels are printed. I then press the save output button to redirect to an external file. I then open this file to list its contents. It may still not be entirely what you're after, but this is the best I can do for now.

    Best regards,

    Henk-Piet Glas

    Principal Technical Specialist
    Embedded Software
    ?????

  5. #25
    Intermediate Intermediate Pirate02 is on a distinguished road
    Join Date
    Jun 2019
    Posts
    15
    Points
    330

    Problem CPU time return value ???

    Hi henk-piet.glas, thanks for reply.

    In my project in parallel, I just noticed a problem today. When I measured the CPU time with the function Delay() there is no problem, but when I executed my function for example 10 000 times in a for loop it return me 0 for the CPU time and it's not possible (even with my pc with a 3,50 GHZ processor it takes 20 sec ^^) ? Can you check the code and find what is the problem please ? (in the file CPU_Demo.c, towards the end of the main())

    Thank you in advance henk-piet.glas.
    ?????
    Last edited by Pirate02; Jul 24th, 2019 at 07:08 AM.

  6. #26
    Advanced Advanced HIGHTEC.henk-piet.glas is on a distinguished road
    Join Date
    May 2017
    Posts
    106
    Points
    2077.5

    Hi Pirathap,

    I've been working on some other stuff, so it's already been a while since your last posting. Is the problem still current or have you meanwhile figured out the answer for yourself?

    Best regards,

    Henk-Piet Glas

    Principal Technical Specialist
    Embedded Software

  7. #27
    Intermediate Intermediate Pirate02 is on a distinguished road
    Join Date
    Jun 2019
    Posts
    15
    Points
    330
    Hello henk-piet.glas thanks for your reply.

    I tried to search for 2 days but I can not find the solution, so it must be a few things relatively simple. I would like a helping hand from you.

    It's as if the function I'm running 10,000 times did not run at all and the t0 and t1 were worth 0 seconds so that's weird.

    Best regards,

    Pirate02
    Last edited by Pirate02; Jul 28th, 2019 at 03:23 AM.

  8. #28
    Advanced Advanced HIGHTEC.henk-piet.glas is on a distinguished road
    Join Date
    May 2017
    Posts
    106
    Points
    2077.5

    Hi Pirathap,

    I looked at the disassembly of your project, and function sort() wasn't created. Rephrasing, since all of its variables are automatics and since it has no incoming our outgoing parameters, the compiler drops its content. Rephrasing, it concludes that it adds no logic to your application other than some void operations, which are subsequently dismissed.

    A quick-and-dirty solution would be to declare array as volatile (so volatile int array). Typically you only need this qualifier for SFRs and variables shared between the main program and an ISR. In this case it's netto effect is that the compiler doesn't optimise it out of your application. It's not the best solution, because all reads and writes to array are now explicit, so it doesn't result in the best code.

    The preferred solution would be to pass array as a parameter that you want to bubble sort. You probably didn't do that because you wanted to run some quick tests.

    Best regards,

    Henk-Piet Glas[INDENT]
    Principal Technical Specialist
    Embedded Software

  9. #29
    Intermediate Intermediate Pirate02 is on a distinguished road
    Join Date
    Jun 2019
    Posts
    15
    Points
    330
    Hi henk-piet.glas, thank you, It was the problem that you told me. I search on the website of infineon a software that can analyze the performances of the board in term of CPU time, Memory RAM/ROM, etc. with graphic but they are all in trial version or paying. Do you know a software that I can use to analyze these kind of informations on the IDE freetool chain maybe or something else (and how I have to use it ?).

    Best regards,

    Pirate02

  10. #30
    Advanced Advanced HIGHTEC.henk-piet.glas is on a distinguished road
    Join Date
    May 2017
    Posts
    106
    Points
    2077.5

    Hi Pirathap,

    My apologies for the delay. I was enjoying my holidays.

    Within the HighTec development platform for AURIX (and also the free entry toolchain) you have the ability to use tricore-gcov. This provides non-graphical information about which branches have been taken. You'll need to study chapter 20.13 of the user manual to decide if it can help you.

    In addition to the above you can obtain some information from the tsim log, but again it will not be graphical. So you'd need to transform this information yourself. TSIM also supports CCNT. If you decide to use it you must use the -g command line option.

    Best regards,

    Henk-Piet Glas

    Principal Technical Specialist
    Embedded Software

+ Reply to Thread

Tags for this Thread

Disclaimer

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.