• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Development Tools » TI C/C++ Compiler » TI C/C++ Compiler - Forum » Projaect with SYSBios and with Peripherials
Share
TI C/C++ Compiler
  • Forum
Options
  • Subscribe via RSS

Projaect with SYSBios and with Peripherials

Projaect with SYSBios and with Peripherials

This question is answered
Sabina Greenberg101872
Posted by Sabina Greenberg101872
on Apr 08 2012 00:33 AM
Expert1320 points

Dear support,

We work with Piccolo F28035PN card and build application with SYSBIOS that use CAN peripherials. We added to the project DSP2803x_Headers_BIOS.cmd and DSP2803x_GlobalVariableDefs.c files. And get the following error:

#148 declaration is incompatible with "void (*Flash_CallbackPtr)() C" (declared at line 29 of "...\DSP2803x_headers\include\DSP2803x_BootVars.h") DSP2803x_GlobalVariableDefs.c ‪/PiccoloTestApplWithSysBios‬ line 399 C/C++ Problem

the problem disappears if we comment the following section in DSP2803x_GlobalVariableDefs.c:

#ifdef __cplusplus
#pragma DATA_SECTION("FlashCallbackVar");
#else
#pragma DATA_SECTION(Flash_CallbackPtr, "FlashCallbackVar");
#endif
void (*Flash_CallbackPtr) (void);

 Could you help us with it? We don't understand the reason of this error. DSP2803x_BootVars.h has the same declaration as DSP2803x_GlobalVariableDefs.c.

The project without SYSBIOS using doesn't get this error.

Thanks,Sabina

SYSBios and Peripherials
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • AartiG
    Posted by AartiG
    on Apr 11 2012 09:14 AM
    Guru69065 points

    Sabina,

    Can you provide a small reproducible test case that demonstrates this issue? Please zip up the complete project folder and attach it here. Also include any source/header files that you have modified (DSP2803x_BootVars.h, DSP2803x_GlobalVariableDefs.c etc) from the default ones provided in ControlSuite.


    If a post answers your question please mark it with the "Verify Answer" button

    Search the wikis for common questions: CGT, BIOS,  CCSv3, CCSv4
    Track a known bug with SDOWP. Enter the bug id in the "Find Record ID" box

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Sabina Greenberg101872
    Posted by Sabina Greenberg101872
    on Apr 15 2012 00:21 AM
    Expert1320 points

    2021.PiccoloTestApplWithSysBios.zip

    Dear support,

    I attached my project. the file that was changed is DSP2803x_GlobalVariableDefs.c (zip includes it).

    File DSP2803x_BootVars.h was not changed. i take it from ControlSuite as is.

    Thanks for your helps,

    Sabina

    TI C/C++ Compiler
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • AartiG
    Posted by AartiG
    on Apr 16 2012 10:53 AM
    Verified Answer
    Verified by AartiG
    Guru69065 points

    Sabina,

    The error is appearing because the project has the "Treat C files as C++ files" option enabled. When mixing C and C+ files the extern "C" syntax should be applied to function declarations to avoid conflicts due to name mangling.

    If the DSP2803x_GlobalVariableDefs.c file is modified as below, it should build without error. Let us know if this helps.

    #ifdef __cplusplus
    extern "C" {
    #endif

    #ifdef __cplusplus
    #pragma DATA_SECTION("FlashCallbackVar");
    #else
    #pragma DATA_SECTION(Flash_CallbackPtr, "FlashCallbackVar");
    #endif

    void (*Flash_CallbackPtr) (void);
    #ifdef __cplusplus
    }
    #endif


    If a post answers your question please mark it with the "Verify Answer" button

    Search the wikis for common questions: CGT, BIOS,  CCSv3, CCSv4
    Track a known bug with SDOWP. Enter the bug id in the "Find Record ID" box

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Sabina Greenberg101872
    Posted by Sabina Greenberg101872
    on Apr 16 2012 11:06 AM
    Expert1320 points

    Thanks a lot! it helped!

    Regards, Sabina

     

    TI C/C++ Compiler
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use