mirror of
https://github.com/BotChain-Robots/firmware.git
synced 2026-07-08 17:47:21 +02:00
Add PSRAM
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
idf_component_register(SRCS "main.cpp" "LoopManager.cpp"
|
||||
PRIV_REQUIRES spi_flash nvs_flash esp_event rpc constants config rmt esp_driver_gptimer dataLink flatbuffers
|
||||
PRIV_REQUIRES esp_psram spi_flash nvs_flash esp_event rpc constants config rmt esp_driver_gptimer dataLink flatbuffers
|
||||
INCLUDE_DIRS "")
|
||||
|
||||
if(DEFINED BOARD_NAME AND BOARD_NAME)
|
||||
@@ -37,4 +37,4 @@ endif()
|
||||
if(DEFINED VERIFY_RECEIVE AND VERIFY_RECEIVE)
|
||||
message(STATUS "Building with VERIFY_RECEIVE: " ${VERIFY_RECEIVE})
|
||||
idf_build_set_property(COMPILE_DEFINITIONS VERIFY_RECEIVE APPEND)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
#include <memory>
|
||||
#include <MessagingInterface.h>
|
||||
|
||||
#include "esp_log.h"
|
||||
|
||||
void LoopManager::control_loop() {
|
||||
const auto messaging_interface = std::make_unique<MessagingInterface>();
|
||||
|
||||
@@ -15,6 +17,10 @@ void LoopManager::control_loop() {
|
||||
while (true) {
|
||||
messaging_interface->recv(buffer, 512, 0, 1);
|
||||
std::cout << buffer << std::endl;
|
||||
|
||||
ESP_LOGI("MEM", "Free internal RAM: %d", heap_caps_get_free_size(MALLOC_CAP_8BIT));
|
||||
ESP_LOGI("MEM", "Free PSRAM: %d", heap_caps_get_free_size(MALLOC_CAP_SPIRAM));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "sdkconfig.h"
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/task.h"
|
||||
#include "freertos/queue.h"
|
||||
|
||||
#include "WifiManager.h"
|
||||
#include "mDNSDiscoveryService.h"
|
||||
@@ -12,8 +13,12 @@
|
||||
#include "ConfigManager.h"
|
||||
#include "constants/tcp.h"
|
||||
#include "LoopManager.h"
|
||||
#include "esp_log.h"
|
||||
|
||||
extern "C" [[noreturn]] void app_main(void) {
|
||||
ESP_LOGI("MEM", "Free internal RAM: %d", heap_caps_get_free_size(MALLOC_CAP_8BIT));
|
||||
ESP_LOGI("MEM", "Free PSRAM: %d", heap_caps_get_free_size(MALLOC_CAP_SPIRAM));
|
||||
|
||||
ConfigManager::init_config();
|
||||
|
||||
const auto manager = std::make_unique<WifiManager>();
|
||||
|
||||
Reference in New Issue
Block a user