Skip to content

Commit

Permalink
feat: himax we-1 support (wip) (#3)
Browse files Browse the repository at this point in the history
* chore: cleanup

* feat: himax we-1 support (wip)

* chore: bug fixes

* chore/fix: add missing headers, cleanup

* fix: avoid using C99 style initializer

* fix: compile issue with stdio

* fix: add missing stddef header

* chore: eliminate explicit use of local

* fix: remove port config

* fix: add missing stdarg

* refactor: rename el_misc_esp

* fix: stop stream logic

* chore/fix: temporarily comment out stdio/stdarg due to compile error on arc compiler
  • Loading branch information
iChizer0 committed Oct 7, 2023
1 parent e07e0f4 commit 18a74e1
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 11 deletions.
4 changes: 2 additions & 2 deletions core/data/el_data_storage.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@
#include "core/synchronize/el_mutex.hpp"

#ifdef CONFIG_EL_LIB_FLASHDB

extern "C" {
#include "third_party/FlashDB/flashdb.h"

}
namespace edgelab {

namespace types {
Expand Down
2 changes: 0 additions & 2 deletions core/el_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,5 @@
#ifndef _EL_CONFIG_H_
#define _EL_CONFIG_H_

#define CONFIG_EL_TARGET_ESPPRESSIF
#define CONFIG_EL_BOARD_SEEED_XIAO_ESP32S3

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,11 @@ EL_ATTR_WEAK int el_printf(const char* fmt, ...) {

EL_ATTR_WEAK int el_putchar(char c) { return putchar(c); }

EL_ATTR_WEAK void* el_malloc(size_t size) { return malloc(size); }
EL_ATTR_WEAK void* el_malloc(size_t size) {
static uint8_t tensor_arena[450 * 1024] __attribute__((aligned(16)));

return reinterpret_cast<void*>(tensor_arena);
}

EL_ATTR_WEAK void* el_calloc(size_t nmemb, size_t size) { return calloc(nmemb, size); }

Expand Down
2 changes: 1 addition & 1 deletion porting/espressif/el_serial_esp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

#include <driver/usb_serial_jtag.h>

#include <locale>
#include <cctype>

#include "core/el_debug.h"
#include "core/el_types.h"
Expand Down
2 changes: 1 addition & 1 deletion porting/himax/el_camera_himax.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ el_err_code_t CameraHimax::start_stream() {
}

el_err_code_t CameraHimax::stop_stream() {
camera_deinit();
datapath_stop_work();
this->_is_streaming = false;
return EL_OK;
}
Expand Down
2 changes: 1 addition & 1 deletion porting/himax/el_serial_himax.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

#include "el_serial_himax.h"

#include <locale>
#include <cctype>

#include "core/el_debug.h"
#include "core/el_types.h"
Expand Down
2 changes: 1 addition & 1 deletion sscma/interpreter/utility.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <locale>
#include <cctype>

#include "sscma/interpreter/types.hpp"

Expand Down
6 changes: 4 additions & 2 deletions third_party/FlashDB/fal_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
#define _FAL_DEF_H_

#include <stdint.h>
#include <stdio.h>
// #include <stdio.h>
// #include <stdarg.h>
#include <stddef.h>
#ifdef FDB_USING_NATIVE_ASSERT
#include <assert.h>
#endif
Expand Down Expand Up @@ -123,7 +125,7 @@ struct fal_flash_dev
int (*erase)(long offset, size_t size);
} ops;

/* write minimum granularity, unit: bit.
/* write minimum granularity, unit: bit.
1(nor flash)/ 8(stm32f2/f4)/ 32(stm32f1)/ 64(stm32l4)
0 will not take effect. */
size_t write_gran;
Expand Down

0 comments on commit 18a74e1

Please sign in to comment.