This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

strlen() <-> xstrlen(), xhuge, etc.

Hi all,

Our project uses the HLARGE memory model. I'm trying to run the (received but not very well documented) application from RAM instead of flash by copying it to RAM in the startup.a66 file. And now I'm running into some problems and I'm not sure if it's caused by a lack of C167 knowledge, or lack of application/dependency knowledge. Probably both :-)

My questions:

What is the difference between strlen() and xstrlen() (or x...() functions in general)?

Why wouldn't I be able to use strlen() (which is standard C right?)? What situations require xstrlen() to be used and what would go wrong if you don't?

If you have a regular declared character array:

static const g_u8_typ crc_TEST_STRING[]= "THE,QUICK,BROWN,FOX,0123456789" ;
can you feed it to a function that requires a xhuge pointer? Or does the string have to be declared as xhuge as well, and if so, why?

Thanks,
Joost Leeuwesteijn

0