Welcome, Guest
Username: Password: Remember me

TOPIC: compile for Raspberry Pi

Re: compile for Raspberry Pi 11 years 9 months ago #3993

  • siamect
  • siamect's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 116
  • Thank you received: 1
  • Karma: 1
Guess I celebrated success a little early...
There are some messages:
-- Merge  exe/tools_cmsg2c
Copy /home/pwrp/pwrsrc_4.8.5-1/rls_dbg/os_linux/hw_arm/rt/exe/tools_cmsg2c
cp: cannot stat `/home/pwrp/pwrsrc_4.8.5-1/rls_dbg/os_linux/hw_arm/rt/exe/tools_cmsg2c': No such file or directory

-- Merge  exe/tools_msg2cmsg
Copy /home/pwrp/pwrsrc_4.8.5-1/rls_dbg/os_linux/hw_arm/rt/exe/tools_msg2cmsg
cp: cannot stat `/home/pwrp/pwrsrc_4.8.5-1/rls_dbg/os_linux/hw_arm/rt/exe/tools_msg2cmsg': No such file or directory

-- Merge  exe/tools_pdrgen
Copy /home/pwrp/pwrsrc_4.8.5-1/rls_dbg/os_linux/hw_arm/rt/exe/tools_pdrgen
cp: cannot stat `/home/pwrp/pwrsrc_4.8.5-1/rls_dbg/os_linux/hw_arm/rt/exe/tools_pdrgen': No such file or directory

here is my environment:
pwrp@martin-laptop:~/pwrsrc_4.8.5-1$ pwre show 
--
-- Environment    : armx485
-- Module.........: rt
-- Source root....: /home/pwrp/pwrsrc_4.8.5-1/src
-- Import root....: /usr/pwr48/os_linux/hw_x86
-- Build root.....: /home/pwrp/pwrsrc_4.8.5-1/rls_dbg
-- Build type.....: dbg
-- OS.............: linux
-- Hardware.......: arm
-- Description....: martin's environment
--
pwrp@martin-laptop:~/pwrsrc_4.8.5-1$ ./info
pwre_croot /home/pwrp/pwrsrc_4.8.5-1
pwre_sroot /home/pwrp/pwrsrc_4.8.5-1/src
pwre_broot /home/pwrp/pwrsrc_4.8.5-1/rls_dbg
pwr_eexe /home/pwrp/pwrsrc_4.8.5-1/rls_dbg/os_linux/hw_arm/exp/exe
pwr_elib /home/pwrp/pwrsrc_4.8.5-1/rls_dbg/os_linux/hw_arm/exp/lib
pwr_eobj /home/pwrp/pwrsrc_4.8.5-1/rls_dbg/os_linux/hw_arm/exp/obj
pwr_exe /home/pwrp/pwrsrc_4.8.5-1/rls_dbg/os_linux/hw_arm/rt/exe
pwr_lib /home/pwrp/pwrsrc_4.8.5-1/rls_dbg/os_linux/hw_arm/rt/lib
jdk /usr/local/jdk
pwre_cc arm-linux-gnueabi-gcc
pwre_cxx arm-linux-gnueabi-g++
pwre_ar arm-linux-gnueabi-ar
pwre_host_exe /usr/pwr48/os_linux/hw_x86/exp/exe
pwre_env_db /home/pwrp/pwre_env_db
pwre_bin /home/pwrp/pwrsrc_4.8.5-1/src/tools/pwre/src/os_linux

and here is whaat I do:
export jdk=/usr/local/jdk
 export PATH=$PATH:$jdk/bin

 export pwre_cc=arm-linux-gnueabi-gcc
 export pwre_cxx=arm-linux-gnueabi-g++
 export pwre_ar=arm-linux-gnueabi-ar

 export pwre_host_exe=/usr/pwr48/os_linux/hw_x86/exp/exe
 export pwre_env_db=/home/pwrp/pwre_env_db
 export pwre_bin=/home/pwrp/pwrsrc_4.8.5-1/src/tools/pwre/src/os_linux
 export pwre_dir_symbols=/home/pwrp/pwrsrc_4.8.5-1/src/tools/pwre/src/os_linux/dir_symbols.mk
 export pwre_kroot=/home/pwrp/pwrsrc_4.8.5-1/src

 source $pwre_bin/pwre_function

 pwre init armx485
 pwre configure
 pwre create_all_modules
 pwre import rt
 pwre import java
 pwre ebuild rt

I have played around a lot and I'm runnning low on ideas how to get this one solved...
Thanks
Martin
The administrator has disabled public write access.

Re: compile for Raspberry Pi 11 years 9 months ago #3994

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3177
  • Thank you received: 502
  • Karma: 133
Hi Martin,

I don't think that these messages should cause any problems, Those missing programs are just used by the build script and not needed at runtime. Thus they are not built for ARM (although the merge script still tried to copy them), and the version that is used by the build script is fetched from $pwre_host_exe.

/Claes
The administrator has disabled public write access.

Re: compile for Raspberry Pi 11 years 9 months ago #3996

  • siamect
  • siamect's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 116
  • Thank you received: 1
  • Karma: 1
Thanks again Claes

I got problems when compiling PLC programs, and I have absolutely no clue why...
I thought maybe it was because of the three missing files from my earlier post...
Here is the result of the PLC compile...
Setting base /usr/pwr48
Open raspberry
args: raspberry pwrp pwrp  
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
Welcome to
raspberry       V4.8_raspberry  

Revision history
2012-07-22	pwrp	Project created
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
-- Processing line: 67
-- Building volume directory
-- Build node raspberry
-- Creating bootfile for node raspberry
-- Plc thread generated priority 22, scantime   0.10000 s, 1 plcpgm's 
Setting base /usr/pwr48_raspberry
-- Cross compilation ARM_LINUX
In file included from /usr/pwr48_raspberry/os_linux/hw_arm/exp/inc/rt_plc.h:49:0,
                 from /usr/local/pwrp/raspberry/bld/common/tmp/plc_raspberry_0001_plc.gc:1:
/usr/pwr48_raspberry/os_linux/hw_arm/exp/inc/pwr.h:577:1: warning: missing braces around initializer [-Wmissing-braces]
/usr/pwr48_raspberry/os_linux/hw_arm/exp/inc/pwr.h:577:1: warning: (near initialization for ‘pwr_cNTime.tv_sec’) [-Wmissing-braces]
/usr/pwr48_raspberry/os_linux/hw_arm/exp/inc/pwr.h:578:1: warning: missing braces around initializer [-Wmissing-braces]
/usr/pwr48_raspberry/os_linux/hw_arm/exp/inc/pwr.h:578:1: warning: (near initialization for ‘pwr_cNDeltaTime.tv_sec’) [-Wmissing-braces]
In file included from /usr/pwr48_raspberry/os_linux/hw_arm/exp/inc/rt_plc.h:61:0,
                 from /usr/local/pwrp/raspberry/bld/common/tmp/plc_raspberry_0001_plc.gc:1:
/usr/pwr48_raspberry/os_linux/hw_arm/exp/inc/rt_thread.h:67:3: error: #error Not defined for this platform !
/usr/pwr48_raspberry/os_linux/hw_arm/exp/inc/rt_thread.h:77:31: error: unknown type name ‘thread_sCond’
/usr/pwr48_raspberry/os_linux/hw_arm/exp/inc/rt_thread.h:78:32: error: unknown type name ‘thread_sCond’
/usr/pwr48_raspberry/os_linux/hw_arm/exp/inc/rt_thread.h:79:35: error: unknown type name ‘thread_sCond’
/usr/pwr48_raspberry/os_linux/hw_arm/exp/inc/rt_thread.h:79:50: error: unknown type name ‘thread_sMutex’
/usr/pwr48_raspberry/os_linux/hw_arm/exp/inc/rt_thread.h:80:31: error: unknown type name ‘thread_sCond’
/usr/pwr48_raspberry/os_linux/hw_arm/exp/inc/rt_thread.h:80:46: error: unknown type name ‘thread_sMutex’
/usr/pwr48_raspberry/os_linux/hw_arm/exp/inc/rt_thread.h:81:31: error: unknown type name ‘thread_sMutex’
/usr/pwr48_raspberry/os_linux/hw_arm/exp/inc/rt_thread.h:82:31: error: unknown type name ‘thread_sMutex’
/usr/pwr48_raspberry/os_linux/hw_arm/exp/inc/rt_thread.h:83:33: error: unknown type name ‘thread_sMutex’
/usr/pwr48_raspberry/os_linux/hw_arm/exp/inc/rt_thread.h:84:29: error: unknown type name ‘thread_s’
/usr/pwr48_raspberry/os_linux/hw_arm/exp/inc/rt_thread.h:85:29: error: unknown type name ‘thread_s’
/usr/pwr48_raspberry/os_linux/hw_arm/exp/inc/rt_thread.h:87:30: error: unknown type name ‘thread_s’
/usr/pwr48_raspberry/os_linux/hw_arm/exp/inc/rt_thread.h:88:27: error: unknown type name ‘thread_s’
/usr/pwr48_raspberry/os_linux/hw_arm/exp/inc/rt_thread.h:89:29: error: unknown type name ‘thread_s’
/usr/pwr48_raspberry/os_linux/hw_arm/exp/inc/rt_thread.h:90:35: error: unknown type name ‘thread_s’
In file included from /usr/pwr48_raspberry/os_linux/hw_arm/exp/inc/rt_lst.h:45:0,
                 from /usr/pwr48_raspberry/os_linux/hw_arm/exp/inc/rt_plc.h:65,
                 from /usr/local/pwrp/raspberry/bld/common/tmp/plc_raspberry_0001_plc.gc:1:
/usr/pwr48_raspberry/os_linux/hw_arm/exp/inc/rt_sync.h:46:29: error: unknown type name ‘thread_sCond’
/usr/pwr48_raspberry/os_linux/hw_arm/exp/inc/rt_sync.h:47:30: error: unknown type name ‘thread_sMutex’
/usr/pwr48_raspberry/os_linux/hw_arm/exp/inc/rt_sync.h:48:31: error: unknown type name ‘thread_sCond’
/usr/pwr48_raspberry/os_linux/hw_arm/exp/inc/rt_sync.h:49:30: error: unknown type name ‘thread_sMutex’
/usr/pwr48_raspberry/os_linux/hw_arm/exp/inc/rt_sync.h:50:31: error: unknown type name ‘thread_sMutex’
In file included from /usr/pwr48_raspberry/os_linux/hw_arm/exp/inc/rt_plc.h:65:0,
                 from /usr/local/pwrp/raspberry/bld/common/tmp/plc_raspberry_0001_plc.gc:1:
/usr/pwr48_raspberry/os_linux/hw_arm/exp/inc/rt_lst.h:55:26: error: unknown type name ‘thread_sMutex’
/usr/pwr48_raspberry/os_linux/hw_arm/exp/inc/rt_lst.h:56:24: error: unknown type name ‘thread_sMutex’
/usr/pwr48_raspberry/os_linux/hw_arm/exp/inc/rt_lst.h:57:30: error: unknown type name ‘thread_sMutex’
/usr/pwr48_raspberry/os_linux/hw_arm/exp/inc/rt_lst.h:58:30: error: unknown type name ‘thread_sMutex’
/usr/pwr48_raspberry/os_linux/hw_arm/exp/inc/rt_lst.h:59:27: error: unknown type name ‘thread_sMutex’
/usr/pwr48_raspberry/os_linux/hw_arm/exp/inc/rt_lst.h:60:28: error: unknown type name ‘thread_sMutex’
/usr/pwr48_raspberry/os_linux/hw_arm/exp/inc/rt_lst.h:61:26: error: unknown type name ‘thread_sMutex’
/usr/pwr48_raspberry/os_linux/hw_arm/exp/inc/rt_lst.h:62:26: error: unknown type name ‘thread_sMutex’
/usr/pwr48_raspberry/os_linux/hw_arm/exp/inc/rt_lst.h:63:24: error: unknown type name ‘thread_sMutex’
/usr/pwr48_raspberry/os_linux/hw_arm/exp/inc/rt_lst.h:64:19: error: unknown type name ‘thread_sMutex’
/usr/pwr48_raspberry/os_linux/hw_arm/exp/inc/rt_lst.h:65:21: error: unknown type name ‘thread_sMutex’
/usr/pwr48_raspberry/os_linux/hw_arm/exp/inc/rt_lst.h:66:25: error: unknown type name ‘thread_sMutex’
/usr/pwr48_raspberry/os_linux/hw_arm/exp/inc/rt_lst.h:67:25: error: unknown type name ‘thread_sMutex’
/usr/pwr48_raspberry/os_linux/hw_arm/exp/inc/rt_lst.h:68:19: error: unknown type name ‘thread_sMutex’
In file included from /usr/pwr48_raspberry/os_linux/hw_arm/exp/inc/rt_plc.h:69:0,
                 from /usr/local/pwrp/raspberry/bld/common/tmp/plc_raspberry_0001_plc.gc:1:
/usr/pwr48_raspberry/os_linux/hw_arm/exp/inc/rt_que.h:45:3: error: unknown type name ‘thread_sMutex’
/usr/pwr48_raspberry/os_linux/hw_arm/exp/inc/rt_que.h:46:3: error: unknown type name ‘thread_sCond’
In file included from /usr/pwr48_raspberry/os_linux/hw_arm/exp/inc/rt_gdh.h:65:0,
                 from /usr/pwr48_raspberry/os_linux/hw_arm/exp/inc/rt_plc_timer.h:53,
                 from /usr/pwr48_raspberry/os_linux/hw_arm/exp/inc/rt_io_supervise.h:65,
                 from /usr/pwr48_raspberry/os_linux/hw_arm/exp/inc/rt_io_base.h:62,
                 from /usr/pwr48_raspberry/os_linux/hw_arm/exp/inc/rt_plc.h:129,
                 from /usr/local/pwrp/raspberry/bld/common/tmp/plc_raspberry_0001_plc.gc:1:
/usr/pwr48_raspberry/os_linux/hw_arm/exp/inc/rt_errh.h:67:5: error: #error Platform not defined
In file included from /usr/local/pwrp/raspberry/bld/common/tmp/plc_raspberry_0001_plc.gc:1:0:
/usr/pwr48_raspberry/os_linux/hw_arm/exp/inc/rt_plc.h:133:3: error: unknown type name ‘thread_s’
/usr/pwr48_raspberry/os_linux/hw_arm/exp/inc/rt_plc.h:136:3: error: unknown type name ‘sem_t’
/usr/pwr48_raspberry/os_linux/hw_arm/exp/inc/rt_plc.h:162:3: error: unknown type name ‘thread_sMutex’
/usr/pwr48_raspberry/os_linux/hw_arm/exp/inc/rt_plc.h:163:3: error: unknown type name ‘thread_sCond’
/usr/pwr48_raspberry/os_linux/hw_arm/exp/inc/rt_plc.h:192:3: error: unknown type name ‘thread_sMutex’
** Plc process compiled with errors arm_linux Dummy
Setting base /usr/pwr48_raspberry
-- Cross compilation ARM_LINUX
arm-linux-gnueabi-g++: error: /usr/local/pwrp/raspberry/bld/arm_linux/obj/plc_raspberry_0001_plc.o: No such file or directory
** Plc program link errors for arm_linux node plc_raspberry_0001_plc
The administrator has disabled public write access.

Re: compile for Raspberry Pi 11 years 9 months ago #3997

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3177
  • Thank you received: 502
  • Karma: 133
Hi Martin,

It's probably a switch to the compiler that has been changed, -DOS_LINUX should be replaced by -DOS_POSIX. Check in wb_gcg.sh if this has been done (ARM version on os_linux/hw_arm/exp/exe).

/Claes
The administrator has disabled public write access.

Re: compile for Raspberry Pi 11 years 9 months ago #4000

  • siamect
  • siamect's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 116
  • Thank you received: 1
  • Karma: 1
Thanks Claes
I appreciate your help.

Seems to have solved one issue and revealed another one...
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
Welcome to
raspberry       V4.8_raspberry  

Revision history
2012-07-22	pwrp	Project created
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
-- Processing line: 67
-- Building volume directory
-- Build node raspberry
-- Creating bootfile for node raspberry
-- Plc thread generated priority 22, scantime   0.10000 s, 1 plcpgm's 
Setting base /usr/pwr48_raspberry
-- Cross compilation ARM_LINUX
-- Plc process compiled for arm_linux with debug Dummy
Setting base /usr/pwr48_raspberry
-- Cross compilation ARM_LINUX
/usr/lib/gcc/arm-linux-gnueabi/4.6/../../../../arm-linux-gnueabi/bin/ld: cannot find -lplcf000_001_001_005
/usr/lib/gcc/arm-linux-gnueabi/4.6/../../../../arm-linux-gnueabi/bin/ld: cannot find -lpwr_pnak_dummy
collect2: ld returned 1 exit status
** Plc program link errors for arm_linux node plc_raspberry_0001_plc
Last Edit: 11 years 9 months ago by siamect.
The administrator has disabled public write access.

Re: compile for Raspberry Pi 11 years 9 months ago #4003

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3177
  • Thank you received: 502
  • Karma: 133
Hi Martin,

Build libpwr_pnak_dummy with

> pwre module profibus
> pwre build lib pnak_dummy src
> pwre merge

libplcf000_001_001_005.a should be created on bld/arm_linux/lib when the volume is built. When you compile a plc window, an object module is created on bld/arm_linux/obj and when the volume is built all the object modules are inserted in the archive. Have you created the directories bld/arm_linux/obj, lib, lis and exe? Is pwre_ar defined correctly in $pwrp_exe/custom_build.sh?

/Claes
The administrator has disabled public write access.
Time to create page: 7.887 seconds