Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ARDroneLib/VLIB/Platform/video_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
////////////////////////////////////////////
#if TARGET_CPU_ARM == 1
// IPhone
#if defined (USE_ANDROID) || defined (TARGET_OS_IPHONE)
#if defined (USE_ANDROID) || defined (TARGET_OS_IPHONE) || defined (USE_LINUX)

#include "arm11/video_config.h"
#endif // TARGET_OS_IPHONE
Expand Down
4 changes: 4 additions & 0 deletions ARDroneLib/VP_SDK/Build/sysvar.makefile
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,10 @@ else
endif
endif
endif
ifeq ($(USE_ARMV7),yes)
TARGET_CPU_ARM=1
TARGET_CPU_X68=0

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be TARGET_CPU_X86?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, this is a typo...

endif

# All that needs to be exported
########################
Expand Down
6 changes: 6 additions & 0 deletions ARDroneLib/VP_SDK/Build/vlib.makefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ GENERIC_LIBRARY_SOURCE_FILES+= \
Platform/arm9_P6/UVLC/uvlc_mb_layer_p6.S
endif

ifeq ($(USE_ARMV7),yes)
GENERIC_LIBRARY_SOURCE_FILES+= \
Platform/arm11/video_utils.c \
Platform/arm11/UVLC/uvlc_codec.c
endif

ifeq ($(USE_IPHONE),yes)
ifeq ($(PLATFORM_NAME),iphoneos)
GENERIC_LIBRARY_SOURCE_FILES+= \
Expand Down
23 changes: 19 additions & 4 deletions ARDroneLib/VP_SDK/VP_Os/linux/intrin.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,37 @@

#if TARGET_CPU_X86 == 1

static INLINE uint32_t _BitScanReverse(uint32_t* index, uint32_t mask)
/*static INLINE uint32_t _BitScanReverse(uint32_t* index, uint32_t mask)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this necessary? I thought for x86 platforms, there should be no change. Apparently this is breaking the build on Travis.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the part I am unsure about. I got warnings for this but the compilation finished on my laptop.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think after fixing the above mentioned typo, you should be able to un-comment these lines back to their original version and compile this on ARM. Please let me know how it goes.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@PhilippeMorere Did you have a chance to look at this issue?

{
__asm__("bsrl %[mask], %[index]" : [index] "=r" (*index) : [mask] "mr" (mask));

return mask ? 1 : 0;
}
}*/

/*static INLINE uint32_t _byteswap_ulong(uint32_t value)
{
int32_t tmp;

static INLINE uint32_t _byteswap_ulong(uint32_t value)
__asm __volatile(
"eor %1, %2, %2, ror #16\n"
"bic %1, %1, #0x00ff0000\n"
"mov %0, %2, ror #8\n"
"eor %0, %0, %1, lsr #8"
: "=r" (value), "=r" (tmp)
: "r" (value)
);

return value;
}*/

/*static INLINE uint32_t _byteswap_ulong(uint32_t value)
{
__asm("bswap %0":
"=r" (value):
"0" (value));

return value;
}
}*/

static inline uint32_t clz(uint32_t code)
{
Expand Down
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
SDK_PATH:=$(shell pwd)/ARDroneLib
PC_TARGET=yes
USE_LINUX=yes
USE_ARMV7=yes


ifdef MYKONOS
Expand All @@ -15,10 +16,13 @@ $(SDK_TARGET_DIR)

SDK_FLAGS+="USE_APP=no"
SDK_FLAGS+="USE_LIB=yes"
SDK_FLAGS+="USE_LINUX=yes"
SDK_FLAGS+="USE_ARMV7=yes"


all:
@$(MAKE) -C $(SDK_PATH)/Soft/Build $(TMP_SDK_FLAGS) $(SDK_FLAGS) $(MAKECMDGOALS) USE_LINUX=yes
@$(MAKE) -C $(SDK_PATH)/VP_SDK/Build $(TMP_SDK_FLAGS) $(SDK_FLAGS) $(MAKECMDGOALS) USE_LINUX=yes
@$(MAKE) -C $(SDK_PATH)/Soft/Build $(TMP_SDK_FLAGS) $(SDK_FLAGS) $(MAKECMDGOALS)
@$(MAKE) -C $(SDK_PATH)/VP_SDK/Build $(TMP_SDK_FLAGS) $(SDK_FLAGS) $(MAKECMDGOALS)

install:
mkdir -p ${INSTALL_PREFIX}
Expand Down