# Converted Automatically from a CCS makefile into Linux make file #################################################################### ############# Copyright (C) Signalogic,2010 ######################## #################################################################### ################################################################################ # Automatically-generated file. Do not edit! ################################################################################ EMPTY := SPACE := $(EMPTY) $(EMPTY) ORDERED_OBJS += \ $(GEN_CMDS_QUOTED) \ ./tsc_h.obj \ ./sample_sig_func_2.obj \ ./sample_sig_func_1.obj \ ./main.obj \ ./func_task_2.obj \ ./func_task_1.obj \ -llibc.a \ ../Conv_Biosv6.cmd \ -include ../makefile.init RM := rm -rf RMDIR := rm -rf # All of the sources participating in the build are defined here -include sources.mk -include subdir.mk -include objects.mk ifneq ($(MAKECMDGOALS),clean) ifneq ($(strip $(S62_DEPS)),) -include $(S62_DEPS) endif ifneq ($(strip $(ASM_DEPS)),) -include $(ASM_DEPS) endif ifneq ($(strip $(C55_DEPS)),) -include $(C55_DEPS) endif ifneq ($(strip $(S_UPPER_DEPS)),) -include $(S_UPPER_DEPS) endif ifneq ($(strip $(C++_DEPS)),) -include $(C++_DEPS) endif ifneq ($(strip $(S_DEPS)),) -include $(S_DEPS) endif ifneq ($(strip $(CC_DEPS)),) -include $(CC_DEPS) endif ifneq ($(strip $(C64_DEPS)),) -include $(C64_DEPS) endif ifneq ($(strip $(CPP_DEPS)),) -include $(CPP_DEPS) endif ifneq ($(strip $(S64_DEPS)),) -include $(S64_DEPS) endif ifneq ($(strip $(CXX_DEPS)),) -include $(CXX_DEPS) endif ifneq ($(strip $(C67_DEPS)),) -include $(C67_DEPS) endif ifneq ($(strip $(S67_DEPS)),) -include $(S67_DEPS) endif ifneq ($(strip $(S43_DEPS)),) -include $(S43_DEPS) endif ifneq ($(strip $(C62_DEPS)),) -include $(C62_DEPS) endif ifneq ($(strip $(C43_DEPS)),) -include $(C43_DEPS) endif ifneq ($(strip $(C??_DEPS)),) -include $(C??_DEPS) endif ifneq ($(strip $(ASM_UPPER_DEPS)),) -include $(ASM_UPPER_DEPS) endif ifneq ($(strip $(OPT_DEPS)),) -include $(OPT_DEPS) endif ifneq ($(strip $(S??_DEPS)),) -include $(S??_DEPS) endif ifneq ($(strip $(S55_DEPS)),) -include $(S55_DEPS) endif ifneq ($(strip $(C_DEPS)),) -include $(C_DEPS) endif ifneq ($(strip $(SA_DEPS)),) -include $(SA_DEPS) endif ifneq ($(strip $(C_UPPER_DEPS)),) -include $(C_UPPER_DEPS) endif endif -include ../makefile.defs # Add inputs and outputs from these tool invocations to the build variables # All Target all: Conv_Biosv6.out # Tool invocations Conv_Biosv6.out: $(GEN_CMDS) $(CMD_SRCS) $(OBJS) @echo 'Building target: $@' @echo 'Invoking: Linker' /opt/TI/C6000CGT7.0.3/bin/cl6x -mv64+ -g -O1 --define=_EVMC6472 --define=_BIOS --diag_warning=225 -z -mConv_Biosv6.map --warn_sections -i/opt/TI/C6000CGT7.0.3/lib -i/opt/TI/C6000CGT7.0.3/include --reread_libs --rom_model -o Conv_Biosv6.out $(ORDERED_OBJS) @echo 'Finished building target: $@' @echo ' ' # Other Targets clean: -$(RM) $(GEN_CMDS__QTD)$(GEN_SRCS__QTD)$(C6000_EXECUTABLE_OUTPUTS__QTD)$(GEN_MISC_FILES__QTD)$(GEN_OPTS__QTD) Conv_Biosv6.out -$(RM) ./func_task_1.obj .\func_task_2.obj .\main.obj .\sample_sig_func_1.obj .\sample_sig_func_2.obj .\tsc_h.obj -$(RM) ./tsc_h.pp -$(RM) ./func_task_1.pp .\func_task_2.pp .\main.pp .\sample_sig_func_1.pp .\sample_sig_func_2.pp -$(RMDIR)$(GEN_MISC_DIRS__QTD) -@echo ' ' .PHONY: all clean dependents .SECONDARY: -include ../makefile.targets
Hello,
I am trying to build a program where different cores will read/write an area of shared memory (from the .mpa file, it's called SL2RAM and starts at 0x00200000). This way, the cores can communicate. I built a sample under CCS v4.2 for Win XP, CGT 7.0.3, in which one core stores a value to a shared variable, and another core reads from it (in sequential order, so there are no access conflicts). The output I get when running on the EVM C6472 board is something like:
Core 0, writing memory at 271500, value = 5
Core 1, reading memory at 271500, value = 5
Now, I tried to build this program under Linux (Ubuntu, using command-line tools only). The purpose is to automate the whole process to be able to generate executable file in Linux without the need for CCS. I installed TI's CGT, XDC tools, and DSP/BIOS package, Linux versions. I had to change many things, mainly paths from Windows to Linux in the Makefile, subdir.mk, and other files. I generated the .out file successfully and was able to see some output similar to when I was running this on Windows. However, now the message was
Core 0,writing memory at 271500, value = 5
Core 1, reading memory at 271500, value = 0
So, it appears that one core cannot see what the other stored in shared memory, or they are out of sync somehow. It's very surprising to me, since the code for Windows and Linux is the same, and if there were some errors with Linux CGT, I expected the build to fail. So, is there anything else I should do under Linux to enable shared memory? Or is this a known issue Linux CGT issue?
I am attaching the Windows and Linux Makefile versions for comparison.
################################################################################ # Automatically-generated file. Do not edit! ################################################################################ SHELL = cmd.exe EMPTY := SPACE := $(EMPTY) $(EMPTY) ORDERED_OBJS += \ $(GEN_CMDS_QUOTED) \ "./tsc_h.obj" \ "./sample_sig_func_2.obj" \ "./sample_sig_func_1.obj" \ "./main.obj" \ "./func_task_2.obj" \ "./func_task_1.obj" \ -l"libc.a" \ "../Conv_Biosv6.cmd" \ -include ../makefile.init RM := DEL /F RMDIR := RMDIR /S/Q # All of the sources participating in the build are defined here -include sources.mk -include subdir.mk -include objects.mk ifneq ($(MAKECMDGOALS),clean) ifneq ($(strip $(S62_DEPS)),) -include $(S62_DEPS) endif ifneq ($(strip $(ASM_DEPS)),) -include $(ASM_DEPS) endif ifneq ($(strip $(C55_DEPS)),) -include $(C55_DEPS) endif ifneq ($(strip $(S_UPPER_DEPS)),) -include $(S_UPPER_DEPS) endif ifneq ($(strip $(C++_DEPS)),) -include $(C++_DEPS) endif ifneq ($(strip $(S_DEPS)),) -include $(S_DEPS) endif ifneq ($(strip $(CC_DEPS)),) -include $(CC_DEPS) endif ifneq ($(strip $(C64_DEPS)),) -include $(C64_DEPS) endif ifneq ($(strip $(CPP_DEPS)),) -include $(CPP_DEPS) endif ifneq ($(strip $(S64_DEPS)),) -include $(S64_DEPS) endif ifneq ($(strip $(CXX_DEPS)),) -include $(CXX_DEPS) endif ifneq ($(strip $(C67_DEPS)),) -include $(C67_DEPS) endif ifneq ($(strip $(S67_DEPS)),) -include $(S67_DEPS) endif ifneq ($(strip $(S43_DEPS)),) -include $(S43_DEPS) endif ifneq ($(strip $(C62_DEPS)),) -include $(C62_DEPS) endif ifneq ($(strip $(C43_DEPS)),) -include $(C43_DEPS) endif ifneq ($(strip $(C??_DEPS)),) -include $(C??_DEPS) endif ifneq ($(strip $(ASM_UPPER_DEPS)),) -include $(ASM_UPPER_DEPS) endif ifneq ($(strip $(OPT_DEPS)),) -include $(OPT_DEPS) endif ifneq ($(strip $(S??_DEPS)),) -include $(S??_DEPS) endif ifneq ($(strip $(S55_DEPS)),) -include $(S55_DEPS) endif ifneq ($(strip $(C_DEPS)),) -include $(C_DEPS) endif ifneq ($(strip $(SA_DEPS)),) -include $(SA_DEPS) endif ifneq ($(strip $(C_UPPER_DEPS)),) -include $(C_UPPER_DEPS) endif endif -include ../makefile.defs # Add inputs and outputs from these tool invocations to the build variables # All Target all: Conv_Biosv6.out # Tool invocations Conv_Biosv6.out: $(GEN_CMDS) $(CMD_SRCS) $(OBJS) @echo 'Building target: $@' @echo 'Invoking: Linker' "C:/Program Files/Texas Instruments/ccsv4/tools/compiler/c6000/bin/cl6x" -mv64+ -g -O3 --define=_EVMC6472 --define=_BIOS --diag_warning=225 -z -m"Conv_Biosv6.map" --warn_sections -i"C:/Program Files/Texas Instruments/ccsv4/tools/compiler/c6000/lib" -i"C:/Program Files/Texas Instruments/ccsv4/tools/compiler/c6000/include" --reread_libs --rom_model -o "Conv_Biosv6.out" $(ORDERED_OBJS) @echo 'Finished building target: $@' @echo ' ' # Other Targets clean: -$(RM) $(GEN_CMDS__QTD)$(GEN_SRCS__QTD)$(C6000_EXECUTABLE_OUTPUTS__QTD)$(GEN_MISC_FILES__QTD)$(GEN_OPTS__QTD) "Conv_Biosv6.out" -$(RM) ".\func_task_1.obj" ".\func_task_2.obj" ".\main.obj" ".\sample_sig_func_1.obj" ".\sample_sig_func_2.obj" ".\tsc_h.obj" -$(RM) ".\tsc_h.pp" -$(RM) ".\func_task_1.pp" ".\func_task_2.pp" ".\main.pp" ".\sample_sig_func_1.pp" ".\sample_sig_func_2.pp" -$(RMDIR)$(GEN_MISC_DIRS__QTD) -@echo ' ' .PHONY: all clean dependents .SECONDARY: -include ../makefile.targets
Regards,
Andrey