When encryption is enabled, static std::map cause BEE read violation on i.MX RT1052

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

When encryption is enabled, static std::map cause BEE read violation on i.MX RT1052

1,057 Views
cup-a-coffee
Contributor I

In our code, we have constant map object like below:

static const std::map<const uint32_t, const uint32_t> map =
{
{1, 1},
{2, 2}
};

It is initialized by __libc_init_array() before calling main()
When MCU initializes the std::map, a hard fault occurs. At this time, the BEE state was 0x8104

However, when I disable the BEE, MCU works fine with std::map.

 

Questions

  1. Why does this cause a hard fault with a non-zero BEE state when encryption is enabled?
  2. How can I use this std::map + enabled encryption + prevent the hard fault with non-zero BEE state?

 

Labels (1)
0 Kudos
Reply
2 Replies

724 Views
adde_ado
Contributor III

Hi,

We are experiencing the same issue that you have explained in yor post and I wonder if you have find any solution.

 

Best regards,

Adde

0 Kudos
Reply

1,043 Views
jeremyzhou
NXP Employee
NXP Employee

Hi @cup-a-coffee ,
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
According to your statement, it seems like the definition of the above map object causes a hard fault when enabling the XIP encryption mode for RT1050, but it works well on a normal boot of RT1050, is my understanding right?
If yes, I was wondering if you can illustrate the steps of replicating the phenomenon, further, upload the related demo code.Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply