This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RTOS/TMS570LC4357: TMS570LC4357

Part Number: TMS570LC4357
Other Parts Discussed in Thread: HALCOGEN

Tool/software: TI-RTOS

Hello,

I have been into this problem for two weeks. Please I need help.

I want to run an encryption algorithm on TMS570LC. I generated code by Halcogen, I use CCS8.3 and XDC Tools.

The program is as follow:

#include "api.h"
#include <stdio.h>
#include <stdint.h>
#include <string.h>

#define MLEN 59

static unsigned long long overflowcnt = 0;





int main(void)
{
  unsigned char sk[CRYPTO_SECRETKEYBYTES];//CRYPTO_SECRETKEYBYTES = 2500
  unsigned char pk[CRYPTO_PUBLICKEYBYTES]; // CRYPTO_PUBLICKEYBYTES =4500
  unsigned char sm[MLEN+CRYPTO_BYTES];
  unsigned long long smlen;
  unsigned int t0, t1;


  // Key-pair generation

  crypto_sign_keypair(pk, sk);

The problem is that the program shows no results. When I suspend the execution I found the prog stack here in B DataEntry in the file HL_Sysintvec.asm which is generated by HalcoGen.

;-------------------------------------------------------------------------------
; interrupt vectors

resetEntry
        b   _c_int00
undefEntry
        b   undefEntry
svcEntry
        b   svcEntry
prefetchEntry
        b   prefetchEntry
dataEntry
        b   dataEntry
        b   phantomInterrupt
        ldr pc,[pc,#-0x1b0]
        ldr pc,[pc,#-0x1b0]

    
;-------------------------------------------------------------------------------

I increased the Heap to 20000. But the problem persists. Also the memory allocation shows : 

My program is a very ordinary program that is executed on computer before. That means it does need to access any special memory location on the chip. I just want to take the measurement of performance on the chip. 

I am beginner in this domain. Please, I need your help 

How can I solve this problem. 

Bes,

Soundes.

  • Hello Soundes,

    You got an data abort. Can you look at the linked register (LR) to find out the instruction that caused the abort?

    Please go through ARM Cortex-R5 TRM at below link for further information about the LR. The instruction that caused the abort should be LR-8. Also in the CPU, you can find additional information about the cause of the abort in the DFSR (data fault status register) and DFAR (data fault address register). In CCS, if you go to the Registers Window you can find the LR under the Core Registers. For DFSR and DFAR you can find them under the CP15 register (CCS->Registers).

  • Hello QJ wANG;

    It seems that the abort I have is not related to a specific instruction. Because even when I change different instruction, for example I call a normal addition instruction or  print something I have always the abort data Entry b. What do you think?

    Here a print of the registers.

    Also, I used a GIO Driver. And I did not change the generated files by HALCOGEN. Could this be a problem? 

    I am really under pressure and I have to solve this.

    Best regards,

    Soundes.

  • Hi Soundes,

    You opened several threads for the same question, please use the latest one. I will close this one. Thanks.