- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi everyone,
I've made a custom device driver named "Button" wich send an interruption to the processor when the button is clicked, or Longclicked, or turned to the right or to the left. I've written the button.vhd file and then, the button_hw.tcl was generated by the sopc_builder. I've written the button_sw.tcl like this :create_driver Button_driver
set_sw_property hw_class_name Button# The version of this driver
set_sw_property version 7.1# This driver may be incompatible with versions of hardware less# than specified below. Updates to hardware and device drivers# rendering the driver incompatible with older versions of# hardware are noted with this property assignment.# # Multiple-Version compatibility was introduced in version 7.1;# prior versions are therefore excluded.
set_sw_property min_compatible_hw_version 7.1# Initialize the driver in alt_sys_init()
set_sw_property auto_initialize true# Location in generated BSP that above sources will be copied into
set_sw_property bsp_subdirectory drivers# # Source file listings...# # Include files
add_sw_property include_source inc/Button_regs.h
add_sw_property include_source HAL/inc/Button.h
add_sw_property c_source HAL/src/Button.c# This driver supports HAL & UCOSII BSP (OS) types
add_sw_property supported_bsp_type HAL
add_sw_property supported_bsp_type UCOSII# End of file
this file is working, i-e I can access Button.h and Button.c in my software, but I find out that I use C++ function in Button.c, so the compilation isn't working. I've changed the extension of button.c to button.cpp and changed the line in button_sw.tcl # add_sw_property c_source HAL/src/Button.c
add_sw_property cpp_source HAL/src/Button.cpp
and then, the compilation is working. Now I'd like to change button.h to button.hpp, but I don't know how to do? when I change in button_sw.tcl
#add_sw_property include_source HAL/inc/Button.h
add_sw_property include_source HAL/inc/Button.hpp
I have an error in alt_sys_init.c because it includes "Button.h". Anyone has an idea? thanks!
Link Copied
0 Replies

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page