Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8985939
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T21:26:06+00:00 2026-06-15T21:26:06+00:00

I am developing an application for an embedded DSP target (that is not supported

  • 0

I am developing an application for an embedded DSP target (that is not supported by any OS) and the development is carried out using C. I have a simple application that has initialization and a infinite loop as follows :

 #include <>
 main (){

 initialize ;

 while (1){

   poll_timer_for_scheduling (); // use for timing 
   remote_link_to_receive_data();  // used to receive data 
   remote_link_to_transmit_data(); // used to transmit data

   switch (sel) {
    case '1':
           function1();
    case '2':
           dummy_function(); // to be replaced by function2() later
    }


   }

 } // end of main

//-------------------------
 function1()
 {

 // some code

 }

//--------------------------
dummy_function()
{

 // NO code; just an empty function to be replaced later by function2()
}

Now, I compile and dump the executable in to the DSP target, which runs perfectly. The dummy_function() is a function that I want to replace later remotely by function2() as the system may not be accessible. This is similar to online patching of application but the application has to run in the target to perform self-patching.

So my requirement is update the executable with additional functionality (to cater to unforeseen conditions) later during the operational phase. How do I compile a c function function2() and upload the executable to the dummy_function()?

I am looking for a simplified version of dynamic linking functionality in the application. Are there some simple mechanisms to achieve this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T21:26:07+00:00Added an answer on June 15, 2026 at 9:26 pm

    You could use pointers to functions to later switch the implementation in a safe and atomic way. So initially the pointers could all point at the same single no-op dummy function. During the update, you would have to load code for the new function into memory, then switch the pointer to point at the location of the function in the newly loaded code.

    I guess the tricky part might be not the patching of the function, but compiling that function so that it can be loaded later on. On most desktop platforms, dynamically loading code means performing relocations and stuff like that. Not sure how your DSP works in this respect. But simply recompiling the whole project and extracting the changes from that might not be feasible.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a problem linking an application for an embedded target. I'm developing on
I'm developing application using backbone.js & jquery. I have following code in model: runReport:
I am developing a simple WPF application without any auto layout. The goal is
I have been developing a Java application using J2EE and a Derby database. My
I have a PhoneGap application I am developing for iPad that uses video extensively,
I'm developing an embedded application using GCC/G++ compiled for arm-eabi. Due to resource constraints,
I'm developing an embedded application for motor control and I have doubts on what
I'm developing a Java application that uses Kahlua for embedded Lua scripting. After calling
I'm developing an embedded application on VxWorks. I know that the static function is
I am developing an application for Windows 7 devices and I'm using an embedded

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.