You are here

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

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

Summary: 2 Replies, Latest post by Bob Marlowe on 27 Jun 2013 11:12 AM PDT
Verified Answers: 0
Last post
Log in to post new comments.
akashmalhotra's picture
1 post

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?

user_78878863's picture
2553 posts

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.

user_1377889's picture
9307 posts

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.



Log in to post new comments.