Generate a single Hex file from four different projects

Hello Everyone,

I am working on STM32F4.I have four Single Project(P1,P2,P3,P4), each project have their own start-up file, library files & main function. I am able to compile each of the project individually to generate its respective hex files.

Now I want to combine these four projects in to a single multi-project that would generate a single hex file for all of them.

I want to execute the projects in the following sequence:
1. Start-up file of P1 will get executed 1st followed by its main function.
2. Then the control will jump to the start-up file of P2 followed by its main function.
3. Then the control will jump to the start-up file of P3 followed by its main function.

when an system reset is encountered then the control again jumps to P1 & the sequence starts all over again.
I want to call functions of P4 from main functions of P2 & P3 respectively.

So please help me out I am stuck.

Thanks,
Amit

Parents
  • Why you are stuck?

    Because you got an idea that doesn't match your abilities.

    Maybe you should reconsider your idea instead, and modify it until it is simple enough that you understands how to make it work.

    Note that it isn't hard to write

    void main(void) {
        do_something1();
        do_something2();
        do_something3();
        for (;;) {
            do_something4();
        }
    }
    

Reply
  • Why you are stuck?

    Because you got an idea that doesn't match your abilities.

    Maybe you should reconsider your idea instead, and modify it until it is simple enough that you understands how to make it work.

    Note that it isn't hard to write

    void main(void) {
        do_something1();
        do_something2();
        do_something3();
        for (;;) {
            do_something4();
        }
    }
    

Children
More questions in this forum