Running one default program always on PSoC 3 chip while parallely option to write another program on it

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable
        We are developing a communication kit using PSoC 3 chip. We have used some analog and digital components and some components are unused. What we plan to do is the components we have used shall remain always in operation, while the user can configure the unused components and program them on the chip (while our program running already with that). What I mean to say is, we have one default program, which should always run on the chip, and then user have a choice to configure unused components (and pins and ports) by programming that hex file on the chip, without removing our program (both should run together). Right now, If I burn another program on PSoC chip, it will remove previous program. If I put my default program in bootloader and give user an option to put his program in bootloadable part, still when bootloader gives control to bootloadable, all bootloader settings are gone. Is there any work around for this? Is it possible to have a default program always running (whose components user cannot use) while we can write another program which doesn't use those components?   
0 Likes
2 Replies
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

Two ideas come to my mind:

   

First, your program can behave like a boot loader. That way, it can allow to load additional code to the PSoC, and the execute under control of your program. Remember, a PSoC is not a PC with an operating system on it - it doesn't do multi-tasking. So you cannot "run two programs at the same time". They need to cooperate. Best would be to have something like an extension mechanism to be able to plug code into your main program.

   

Second, you can use a scripting language to have user-defineable code. This would allow access to everything which can be handled under software control. Think e.g. BASIC, Forth, Lua or even interpreted C code...

   

In both cases, its not rather difficult to modify the hardware configuration, since this is handled in the generated code, and there is no support for dynamic configuration.

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

When you do not worry that the customer has access to your sources, you can provide a library with your settings and program and give the user a clearly marked entry-point to start your program. I assume that without your code the device is useless, so the customer is willing to use your library. Probably you may link-in an object-file, but I did not (yet) care for the GCC-linker.

   

 

   

Bob

0 Likes