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

How to hide source code?

Hello,
I have a source code and header file that is used for multiple project. I want to hide-protect the source code being read by my coleagues for confidential purposes. I could use https://developer.arm.com/documentation/ka004549/latest for creating lib but it is all static which I dont want.
There is some variables in source code with size defined in header. And I want my coleagues to change the size according to their application. How can I build such system?

We are using Uvision V5.36 with MDK-ARM Cortex-M0 toolchain.

Parents
  • I see, thanks for the answer.

    You can't. 

    I consider my opinion is possible from Keil packs.
    I was checking the CMSIS-RTX pack. There is a configuration wizard to change stacksize etc. When I check the source project of library(RTX_CM0.lib in my case) I can see it is used some variables with size defined in configuration wizard(RTX_Conf_CM.c). An example from RTX_CM_lib.h:

    /* Memory pool for user specified stack allocation (+main, +timer) */
    extern
    uint64_t       os_stack_mem[];
    uint64_t       os_stack_mem[2+OS_PRIV_CNT+(OS_STACK_SZ/8)];

    At the example OS_STACK_SZ defined from configuration wizard as part of size of os_stack_mem which is used in rt_CMSIS.c in source project of lib. So when I change configuration, RTX pack uses it from a library. I just dont get how. 

    So we can understand from CMSIS pack that variable size can be changed and application (RTX_CM0.lib for CMSIS, can be any for my side) can follow the change.

    A note: You can point that RTX lib source is open but it does not have to be open.

Reply
  • I see, thanks for the answer.

    You can't. 

    I consider my opinion is possible from Keil packs.
    I was checking the CMSIS-RTX pack. There is a configuration wizard to change stacksize etc. When I check the source project of library(RTX_CM0.lib in my case) I can see it is used some variables with size defined in configuration wizard(RTX_Conf_CM.c). An example from RTX_CM_lib.h:

    /* Memory pool for user specified stack allocation (+main, +timer) */
    extern
    uint64_t       os_stack_mem[];
    uint64_t       os_stack_mem[2+OS_PRIV_CNT+(OS_STACK_SZ/8)];

    At the example OS_STACK_SZ defined from configuration wizard as part of size of os_stack_mem which is used in rt_CMSIS.c in source project of lib. So when I change configuration, RTX pack uses it from a library. I just dont get how. 

    So we can understand from CMSIS pack that variable size can be changed and application (RTX_CM0.lib for CMSIS, can be any for my side) can follow the change.

    A note: You can point that RTX lib source is open but it does not have to be open.

Children
No data